#include "AxisGlyph.h"

const double PI = 3.14159265358979323846264338327950288419717;
const double TWOPI = 2.0*PI;

AxisGlyph::AxisGlyph(void)
:	currentType(MOVE)
	,currentOn(NONE)
{
}

AxisGlyph::~AxisGlyph(void)
{
	glDeleteLists(arrowCallListID,4);
}

void AxisGlyph::init()
{

	float arrowVertexList[]={10.0000, 0.0000, 0.0000,9.6593, 2.5882, 0.0000,0.0000, 0.0000, 50.0000,8.6603, 5.0000, 0.0000,7.0711, 7.0711, 0.0000, 5.0000, 8.6603, 0.0000,2.5882, 9.6593, 0.0000,
  0.0000, 10.0000, 0.0000,-2.5882, 9.6593, 0.0000,-5.0000, 8.6603, 0.0000,-7.0711, 7.0711, 0.0000,-8.6603, 5.0000, 0.0000,-9.6593, 2.5882, 0.0000,-10.0000, 0.0000, 0.0000,
  -9.6593, -2.5882, 0.0000,-8.6603, -5.0000, 0.0000,-7.0711, -7.0711, 0.0000,-5.0000, -8.6603, 0.0000,-2.5882, -9.6593, 0.0000,-0.0000, -10.0000, 0.0000,
  2.5882, -9.6593, 0.0000,5.0000, -8.6603, 0.0000,7.0711, -7.0711, 0.0000,8.6603, -5.0000, 0.0000,9.6593, -2.5882, 0.0000,
	};

	int arrowFacetList[]=
	{
	 1, 2, 3, 2, 4, 3, 4, 5, 3, 5, 6, 3, 6, 7, 3, 7, 8, 3, 8, 9, 3, 9, 10, 3, 10, 11, 3, 11, 12, 3, 12, 13, 3, 13, 14, 3, 14, 15, 3, 15, 16, 3, 16, 17, 3, 
 17, 18, 3, 18, 19, 3, 19, 20, 3, 20, 21, 3, 21, 22, 3, 22, 23, 3, 23, 24, 3, 24, 25, 3, 25, 1, 3, 24, 23, 22, 22, 21, 20, 20, 19, 18, 22, 20, 18, 
 18, 17, 16, 16, 15, 14, 18, 16, 14, 14, 13, 12, 12, 11, 10, 14, 12, 10, 18, 14, 10, 10, 9, 8, 8, 7, 6, 10, 8, 6, 6, 5, 4, 4, 2, 1, 6, 4, 1, 10, 6, 1, 
 18, 10, 1, 22, 18, 1, 24, 22, 1, 25, 24, 1, 
	};



	arrowCallListID=glGenLists(4);
	circleCallListID=arrowCallListID+1;
	sphereMaskCallistID=arrowCallListID+2;
	boxCallListID=arrowCallListID+3;

	glNewList(arrowCallListID,GL_COMPILE);


	glBegin(GL_TRIANGLES);

	for(int i=0;i<46;++i)
	{
		glVertex3f(arrowVertexList[(arrowFacetList[i*3]-1)*3],arrowVertexList[(arrowFacetList[i*3]-1)*3+1],arrowVertexList[(arrowFacetList[i*3]-1)*3+2]);
		glVertex3f(arrowVertexList[(arrowFacetList[i*3+1]-1)*3],arrowVertexList[(arrowFacetList[i*3+1]-1)*3+1],arrowVertexList[(arrowFacetList[i*3+1]-1)*3+2]);
		glVertex3f(arrowVertexList[(arrowFacetList[i*3+2]-1)*3],arrowVertexList[(arrowFacetList[i*3+2]-1)*3+1],arrowVertexList[(arrowFacetList[i*3+2]-1)*3+2]);

	}

	glEnd();



	glEndList();


	glNewList(circleCallListID,GL_COMPILE);

	glBegin(GL_LINES);
	for(int i=0;i<48;++i)
	{
		float angle1=TWOPI/48.0f*i;
		float angle2=TWOPI/48.0f*(i+1);

		float x=50.0f*cos(angle1);
		float y=50.0f*sin(angle1);

		glVertex3f(x,y,0);

		x=50.0f*cos(angle2);
		y=50.0f*sin(angle2);
		
		glVertex3f(x,y,0);


	}
	glEnd();

	glEndList();


	float sphereVertexList[]={
	0.0000,0.0000,25.0000
,-0.0000,3.2632,24.7861
,-0.4259,3.2352,24.7861
,-0.8446,3.1520,24.7861
,-1.2488,3.0148,24.7861
,-1.6316,2.8260,24.7861
,-1.9865,2.5888,24.7861
,-2.3074,2.3074,24.7861
,-2.5888,1.9865,24.7861
,-2.8260,1.6316,24.7861
,-3.0148,1.2488,24.7861
,-3.1520,0.8446,24.7861
,-3.2352,0.4259,24.7861
,-3.2632,0.0000,24.7861
,-3.2352,-0.4259,24.7861
,-3.1520,-0.8446,24.7861
,-3.0148,-1.2488,24.7861
,-2.8260,-1.6316,24.7861
,-2.5888,-1.9865,24.7861
,-2.3074,-2.3074,24.7861
,-1.9865,-2.5888,24.7861
,-1.6316,-2.8260,24.7861
,-1.2488,-3.0148,24.7861
,-0.8446,-3.1520,24.7861
,-0.4259,-3.2352,24.7861
,0.0000,-3.2632,24.7861
,0.4259,-3.2352,24.7861
,0.8446,-3.1520,24.7861
,1.2488,-3.0148,24.7861
,1.6316,-2.8260,24.7861
,1.9865,-2.5888,24.7861
,2.3074,-2.3074,24.7861
,2.5888,-1.9865,24.7861
,2.8260,-1.6316,24.7861
,3.0148,-1.2487,24.7861
,3.1520,-0.8446,24.7861
,3.2352,-0.4259,24.7861
,3.2632,0.0000,24.7861
,3.2352,0.4259,24.7861
,3.1520,0.8446,24.7861
,3.0148,1.2488,24.7861
,2.8260,1.6316,24.7861
,2.5888,1.9865,24.7861
,2.3074,2.3074,24.7861
,1.9865,2.5888,24.7861
,1.6316,2.8260,24.7861
,1.2487,3.0148,24.7861
,0.8445,3.1520,24.7861
,0.4259,3.2352,24.7861
,-0.0000,6.4705,24.1481
,-0.8446,6.4151,24.1481
,-1.6747,6.2500,24.1481
,-2.4761,5.9779,24.1481
,-3.2352,5.6036,24.1481
,-3.9390,5.1334,24.1481
,-4.5753,4.5753,24.1481
,-5.1334,3.9390,24.1481
,-5.6036,3.2352,24.1481
,-5.9779,2.4761,24.1481
,-6.2500,1.6747,24.1481
,-6.4151,0.8446,24.1481
,-6.4705,0.0000,24.1481
,-6.4151,-0.8446,24.1481
,-6.2500,-1.6747,24.1481
,-5.9779,-2.4761,24.1481
,-5.6036,-3.2352,24.1481
,-5.1334,-3.9390,24.1481
,-4.5753,-4.5753,24.1481
,-3.9390,-5.1334,24.1481
,-3.2352,-5.6036,24.1481
,-2.4761,-5.9779,24.1481
,-1.6747,-6.2500,24.1481
,-0.8446,-6.4151,24.1481
,0.0000,-6.4705,24.1481
,0.8446,-6.4151,24.1481
,1.6747,-6.2500,24.1481
,2.4762,-5.9779,24.1481
,3.2352,-5.6036,24.1481
,3.9390,-5.1334,24.1481
,4.5753,-4.5753,24.1481
,5.1334,-3.9390,24.1481
,5.6036,-3.2352,24.1481
,5.9779,-2.4761,24.1481
,6.2500,-1.6747,24.1481
,6.4151,-0.8445,24.1481
,6.4705,0.0000,24.1481
,6.4151,0.8446,24.1481
,6.2500,1.6747,24.1481
,5.9779,2.4762,24.1481
,5.6036,3.2353,24.1481
,5.1334,3.9390,24.1481
,4.5753,4.5753,24.1481
,3.9390,5.1334,24.1481
,3.2352,5.6036,24.1481
,2.4761,5.9780,24.1481
,1.6746,6.2500,24.1481
,0.8445,6.4151,24.1481
,-0.0000,9.5671,23.0970
,-1.2488,9.4852,23.0970
,-2.4761,9.2411,23.0970
,-3.6612,8.8388,23.0970
,-4.7835,8.2853,23.0970
,-5.8241,7.5901,23.0970
,-6.7650,6.7650,23.0970
,-7.5901,5.8241,23.0970
,-8.2853,4.7835,23.0970
,-8.8388,3.6612,23.0970
,-9.2411,2.4761,23.0970
,-9.4852,1.2488,23.0970
,-9.5671,0.0000,23.0970
,-9.4852,-1.2488,23.0970
,-9.2411,-2.4761,23.0970
,-8.8388,-3.6612,23.0970
,-8.2853,-4.7835,23.0970
,-7.5901,-5.8241,23.0970
,-6.7650,-6.7649,23.0970
,-5.8241,-7.5901,23.0970
,-4.7835,-8.2853,23.0970
,-3.6612,-8.8388,23.0970
,-2.4761,-9.2411,23.0970
,-1.2487,-9.4852,23.0970
,0.0000,-9.5671,23.0970
,1.2488,-9.4852,23.0970
,2.4762,-9.2411,23.0970
,3.6612,-8.8388,23.0970
,4.7836,-8.2853,23.0970
,5.8241,-7.5901,23.0970
,6.7650,-6.7649,23.0970
,7.5901,-5.8241,23.0970
,8.2854,-4.7835,23.0970
,8.8388,-3.6611,23.0970
,9.2411,-2.4761,23.0970
,9.4852,-1.2487,23.0970
,9.5671,0.0000,23.0970
,9.4852,1.2488,23.0970
,9.2411,2.4762,23.0970
,8.8388,3.6612,23.0970
,8.2853,4.7836,23.0970
,7.5901,5.8241,23.0970
,6.7649,6.7650,23.0970
,5.8240,7.5901,23.0970
,4.7835,8.2854,23.0970
,3.6611,8.8389,23.0970
,2.4761,9.2411,23.0970
,1.2487,9.4852,23.0970
,-0.0000,12.5000,21.6506
,-1.6316,12.3931,21.6506
,-3.2352,12.0741,21.6506
,-4.7835,11.5485,21.6506
,-6.2500,10.8253,21.6506
,-7.6095,9.9169,21.6506
,-8.8388,8.8388,21.6506
,-9.9169,7.6095,21.6506
,-10.8253,6.2500,21.6506
,-11.5485,4.7835,21.6506
,-12.0741,3.2352,21.6506
,-12.3931,1.6316,21.6506
,-12.5000,0.0000,21.6506
,-12.3931,-1.6316,21.6506
,-12.0741,-3.2352,21.6506
,-11.5485,-4.7835,21.6506
,-10.8253,-6.2500,21.6506
,-9.9169,-7.6095,21.6506
,-8.8388,-8.8388,21.6506
,-7.6095,-9.9169,21.6506
,-6.2500,-10.8253,21.6506
,-4.7835,-11.5485,21.6506
,-3.2352,-12.0741,21.6506
,-1.6316,-12.3931,21.6506
,0.0000,-12.5000,21.6506
,1.6316,-12.3931,21.6506
,3.2353,-12.0741,21.6506
,4.7836,-11.5485,21.6506
,6.2500,-10.8253,21.6506
,7.6095,-9.9169,21.6506
,8.8389,-8.8388,21.6506
,9.9169,-7.6095,21.6506
,10.8253,-6.2500,21.6506
,11.5485,-4.7835,21.6506
,12.0741,-3.2352,21.6506
,12.3931,-1.6315,21.6506
,12.5000,0.0000,21.6506
,12.3931,1.6316,21.6506
,12.0741,3.2353,21.6506
,11.5485,4.7836,21.6506
,10.8253,6.2500,21.6506
,9.9169,7.6096,21.6506
,8.8388,8.8389,21.6506
,7.6095,9.9170,21.6506
,6.2499,10.8254,21.6506
,4.7835,11.5485,21.6506
,3.2352,12.0741,21.6506
,1.6315,12.3931,21.6506
,-0.0000,15.2190,19.8338
,-1.9865,15.0888,19.8338
,-3.9390,14.7005,19.8338
,-5.8241,14.0606,19.8338
,-7.6095,13.1801,19.8338
,-9.2648,12.0741,19.8338
,-10.7615,10.7615,19.8338
,-12.0741,9.2648,19.8338
,-13.1801,7.6095,19.8338
,-14.0606,5.8241,19.8338
,-14.7005,3.9390,19.8338
,-15.0888,1.9865,19.8338
,-15.2190,0.0000,19.8338
,-15.0888,-1.9865,19.8338
,-14.7005,-3.9390,19.8338
,-14.0606,-5.8241,19.8338
,-13.1801,-7.6095,19.8338
,-12.0741,-9.2648,19.8338
,-10.7615,-10.7615,19.8338
,-9.2648,-12.0741,19.8338
,-7.6095,-13.1801,19.8338
,-5.8241,-14.0606,19.8338
,-3.9390,-14.7005,19.8338
,-1.9865,-15.0888,19.8338
,0.0000,-15.2190,19.8338
,1.9865,-15.0888,19.8338
,3.9390,-14.7005,19.8338
,5.8241,-14.0605,19.8338
,7.6095,-13.1801,19.8338
,9.2648,-12.0741,19.8338
,10.7615,-10.7615,19.8338
,12.0741,-9.2647,19.8338
,13.1801,-7.6095,19.8338
,14.0606,-5.8240,19.8338
,14.7005,-3.9389,19.8338
,15.0888,-1.9864,19.8338
,15.2190,0.0001,19.8338
,15.0888,1.9865,19.8338
,14.7004,3.9390,19.8338
,14.0605,5.8241,19.8338
,13.1800,7.6096,19.8338
,12.0740,9.2648,19.8338
,10.7614,10.7615,19.8338
,9.2647,12.0741,19.8338
,7.6094,13.1801,19.8338
,5.8240,14.0606,19.8338
,3.9389,14.7005,19.8338
,1.9864,15.0888,19.8338
,-0.0000,17.6777,17.6777
,-2.3074,17.5264,17.6777
,-4.5753,17.0753,17.6777
,-6.7650,16.3320,17.6777
,-8.8388,15.3093,17.6777
,-10.7615,14.0246,17.6777
,-12.5000,12.5000,17.6777
,-14.0246,10.7615,17.6777
,-15.3093,8.8388,17.6777
,-16.3320,6.7650,17.6777
,-17.0753,4.5753,17.6777
,-17.5264,2.3074,17.6777
,-17.6777,0.0000,17.6777
,-17.5264,-2.3074,17.6777
,-17.0753,-4.5753,17.6777
,-16.3320,-6.7649,17.6777
,-15.3093,-8.8388,17.6777
,-14.0246,-10.7615,17.6777
,-12.5000,-12.5000,17.6777
,-10.7615,-14.0246,17.6777
,-8.8388,-15.3093,17.6777
,-6.7649,-16.3320,17.6777
,-4.5753,-17.0753,17.6777
,-2.3074,-17.5264,17.6777
,0.0000,-17.6777,17.6777
,2.3074,-17.5264,17.6777
,4.5753,-17.0753,17.6777
,6.7650,-16.3320,17.6777
,8.8389,-15.3093,17.6777
,10.7615,-14.0246,17.6777
,12.5000,-12.5000,17.6777
,14.0247,-10.7614,17.6777
,15.3093,-8.8388,17.6777
,16.3321,-6.7649,17.6777
,17.0753,-4.5753,17.6777
,17.5264,-2.3073,17.6777
,17.6777,0.0001,17.6777
,17.5264,2.3075,17.6777
,17.0753,4.5754,17.6777
,16.3320,6.7650,17.6777
,15.3093,8.8389,17.6777
,14.0246,10.7615,17.6777
,12.4999,12.5001,17.6777
,10.7614,14.0247,17.6777
,8.8388,15.3094,17.6777
,6.7649,16.3321,17.6777
,4.5752,17.0753,17.6777
,2.3073,17.5264,17.6777
,-0.0000,19.8338,15.2190
,-2.5888,19.6642,15.2190
,-5.1334,19.1580,15.2190
,-7.5901,18.3241,15.2190
,-9.9169,17.1766,15.2190
,-12.0741,15.7352,15.2190
,-14.0246,14.0246,15.2190
,-15.7352,12.0741,15.2190
,-17.1766,9.9169,15.2190
,-18.3241,7.5901,15.2190
,-19.1580,5.1334,15.2190
,-19.6642,2.5888,15.2190
,-19.8338,0.0000,15.2190
,-19.6642,-2.5888,15.2190
,-19.1580,-5.1334,15.2190
,-18.3241,-7.5901,15.2190
,-17.1766,-9.9169,15.2190
,-15.7352,-12.0741,15.2190
,-14.0246,-14.0246,15.2190
,-12.0741,-15.7352,15.2190
,-9.9169,-17.1766,15.2190
,-7.5901,-18.3241,15.2190
,-5.1334,-19.1580,15.2190
,-2.5888,-19.6642,15.2190
,0.0000,-19.8338,15.2190
,2.5889,-19.6641,15.2190
,5.1334,-19.1580,15.2190
,7.5901,-18.3241,15.2190
,9.9169,-17.1766,15.2190
,12.0741,-15.7352,15.2190
,14.0247,-14.0246,15.2190
,15.7353,-12.0740,15.2190
,17.1766,-9.9169,15.2190
,18.3241,-7.5900,15.2190
,19.1580,-5.1333,15.2190
,19.6642,-2.5888,15.2190
,19.8338,0.0001,15.2190
,19.6641,2.5889,15.2190
,19.1580,5.1334,15.2190
,18.3240,7.5902,15.2190
,17.1766,9.9170,15.2190
,15.7352,12.0741,15.2190
,14.0246,14.0247,15.2190
,12.0740,15.7353,15.2190
,9.9168,17.1767,15.2190
,7.5900,18.3241,15.2190
,5.1333,19.1580,15.2190
,2.5887,19.6642,15.2190
,-0.0000,21.6506,12.5000
,-2.8260,21.4654,12.5000
,-5.6036,20.9129,12.5000
,-8.2853,20.0026,12.5000
,-10.8253,18.7500,12.5000
,-13.1801,17.1766,12.5000
,-15.3093,15.3093,12.5000
,-17.1766,13.1801,12.5000
,-18.7500,10.8253,12.5000
,-20.0026,8.2853,12.5000
,-20.9129,5.6036,12.5000
,-21.4654,2.8260,12.5000
,-21.6506,0.0000,12.5000
,-21.4654,-2.8260,12.5000
,-20.9129,-5.6036,12.5000
,-20.0026,-8.2853,12.5000
,-18.7500,-10.8253,12.5000
,-17.1766,-13.1801,12.5000
,-15.3093,-15.3093,12.5000
,-13.1801,-17.1766,12.5000
,-10.8253,-18.7500,12.5000
,-8.2853,-20.0026,12.5000
,-5.6036,-20.9129,12.5000
,-2.8260,-21.4654,12.5000
,0.0000,-21.6506,12.5000
,2.8260,-21.4654,12.5000
,5.6036,-20.9129,12.5000
,8.2854,-20.0026,12.5000
,10.8254,-18.7500,12.5000
,13.1801,-17.1766,12.5000
,15.3093,-15.3093,12.5000
,17.1766,-13.1800,12.5000
,18.7500,-10.8253,12.5000
,20.0026,-8.2853,12.5000
,20.9129,-5.6035,12.5000
,21.4654,-2.8259,12.5000
,21.6506,0.0001,12.5000
,21.4654,2.8261,12.5000
,20.9129,5.6037,12.5000
,20.0025,8.2854,12.5000
,18.7500,10.8254,12.5000
,17.1765,13.1801,12.5000
,15.3092,15.3094,12.5000
,13.1800,17.1767,12.5000
,10.8252,18.7501,12.5000
,8.2852,20.0026,12.5000
,5.6035,20.9129,12.5000
,2.8258,21.4654,12.5000
,-0.0000,23.0970,9.5671
,-3.0148,22.8994,9.5671
,-5.9779,22.3100,9.5671
,-8.8388,21.3388,9.5671
,-11.5485,20.0026,9.5671
,-14.0606,18.3241,9.5671
,-16.3320,16.3320,9.5671
,-18.3241,14.0606,9.5671
,-20.0026,11.5485,9.5671
,-21.3388,8.8388,9.5671
,-22.3100,5.9779,9.5671
,-22.8994,3.0148,9.5671
,-23.0970,0.0000,9.5671
,-22.8994,-3.0148,9.5671
,-22.3100,-5.9779,9.5671
,-21.3388,-8.8388,9.5671
,-20.0026,-11.5485,9.5671
,-18.3241,-14.0605,9.5671
,-16.3320,-16.3320,9.5671
,-14.0606,-18.3241,9.5671
,-11.5485,-20.0026,9.5671
,-8.8388,-21.3388,9.5671
,-5.9779,-22.3100,9.5671
,-3.0147,-22.8994,9.5671
,0.0000,-23.0970,9.5671
,3.0148,-22.8994,9.5671
,5.9780,-22.3100,9.5671
,8.8389,-21.3388,9.5671
,11.5485,-20.0026,9.5671
,14.0606,-18.3240,9.5671
,16.3321,-16.3320,9.5671
,18.3241,-14.0605,9.5671
,20.0026,-11.5484,9.5671
,21.3389,-8.8388,9.5671
,22.3100,-5.9779,9.5671
,22.8994,-3.0147,9.5671
,23.0970,0.0001,9.5671
,22.8994,3.0148,9.5671
,22.3100,5.9780,9.5671
,21.3388,8.8389,9.5671
,20.0025,11.5486,9.5671
,18.3240,14.0606,9.5671
,16.3320,16.3321,9.5671
,14.0605,18.3241,9.5671
,11.5484,20.0026,9.5671
,8.8387,21.3389,9.5671
,5.9778,22.3100,9.5671
,3.0146,22.8994,9.5671
,-0.0000,24.1481,6.4705
,-3.1520,23.9416,6.4705
,-6.2500,23.3253,6.4705
,-9.2411,22.3100,6.4705
,-12.0741,20.9129,6.4705
,-14.7005,19.1580,6.4705
,-17.0753,17.0753,6.4705
,-19.1580,14.7005,6.4705
,-20.9129,12.0741,6.4705
,-22.3100,9.2411,6.4705
,-23.3253,6.2500,6.4705
,-23.9416,3.1520,6.4705
,-24.1481,0.0000,6.4705
,-23.9416,-3.1520,6.4705
,-23.3253,-6.2500,6.4705
,-22.3100,-9.2411,6.4705
,-20.9129,-12.0741,6.4705
,-19.1580,-14.7005,6.4705
,-17.0753,-17.0753,6.4705
,-14.7005,-19.1580,6.4705
,-12.0741,-20.9129,6.4705
,-9.2411,-22.3100,6.4705
,-6.2500,-23.3253,6.4705
,-3.1519,-23.9416,6.4705
,0.0000,-24.1481,6.4705
,3.1520,-23.9416,6.4705
,6.2500,-23.3253,6.4705
,9.2411,-22.3100,6.4705
,12.0741,-20.9129,6.4705
,14.7005,-19.1580,6.4705
,17.0754,-17.0753,6.4705
,19.1580,-14.7004,6.4705
,20.9129,-12.0740,6.4705
,22.3100,-9.2410,6.4705
,23.3253,-6.2499,6.4705
,23.9416,-3.1519,6.4705
,24.1481,0.0001,6.4705
,23.9415,3.1521,6.4705
,23.3253,6.2501,6.4705
,22.3099,9.2412,6.4705
,20.9129,12.0742,6.4705
,19.1579,14.7005,6.4705
,17.0752,17.0754,6.4705
,14.7004,19.1581,6.4705
,12.0740,20.9130,6.4705
,9.2410,22.3100,6.4705
,6.2499,23.3254,6.4705
,3.1518,23.9416,6.4705
,-0.0000,24.7861,3.2632
,-3.2352,24.5741,3.2632
,-6.4151,23.9416,3.2632
,-9.4852,22.8994,3.2632
,-12.3931,21.4654,3.2632
,-15.0888,19.6642,3.2632
,-17.5264,17.5264,3.2632
,-19.6642,15.0888,3.2632
,-21.4654,12.3931,3.2632
,-22.8994,9.4852,3.2632
,-23.9416,6.4151,3.2632
,-24.5741,3.2352,3.2632
,-24.7861,0.0000,3.2632
,-24.5741,-3.2352,3.2632
,-23.9416,-6.4151,3.2632
,-22.8994,-9.4852,3.2632
,-21.4654,-12.3931,3.2632
,-19.6642,-15.0888,3.2632
,-17.5264,-17.5264,3.2632
,-15.0888,-19.6642,3.2632
,-12.3931,-21.4654,3.2632
,-9.4852,-22.8994,3.2632
,-6.4151,-23.9416,3.2632
,-3.2352,-24.5741,3.2632
,0.0000,-24.7861,3.2632
,3.2353,-24.5741,3.2632
,6.4152,-23.9415,3.2632
,9.4853,-22.8994,3.2632
,12.3931,-21.4654,3.2632
,15.0889,-19.6641,3.2632
,17.5265,-17.5264,3.2632
,19.6642,-15.0888,3.2632
,21.4654,-12.3930,3.2632
,22.8994,-9.4852,3.2632
,23.9416,-6.4150,3.2632
,24.5741,-3.2352,3.2632
,24.7861,0.0001,3.2632
,24.5741,3.2353,3.2632
,23.9415,6.4152,3.2632
,22.8994,9.4853,3.2632
,21.4654,12.3932,3.2632
,19.6641,15.0889,3.2632
,17.5264,17.5265,3.2632
,15.0887,19.6642,3.2632
,12.3929,21.4655,3.2632
,9.4851,22.8994,3.2632
,6.4150,23.9416,3.2632
,3.2351,24.5741,3.2632
,-0.0000,25.0000,0.0000
,-3.2632,24.7861,0.0000
,-6.4705,24.1481,0.0000
,-9.5671,23.0970,0.0000
,-12.5000,21.6506,0.0000
,-15.2190,19.8338,0.0000
,-17.6777,17.6777,0.0000
,-19.8338,15.2190,0.0000
,-21.6506,12.5000,0.0000
,-23.0970,9.5671,0.0000
,-24.1481,6.4705,0.0000
,-24.7861,3.2632,0.0000
,-25.0000,0.0000,0.0000
,-24.7861,-3.2632,0.0000
,-24.1481,-6.4705,0.0000
,-23.0970,-9.5671,0.0000
,-21.6506,-12.5000,0.0000
,-19.8338,-15.2190,0.0000
,-17.6777,-17.6777,0.0000
,-15.2190,-19.8338,0.0000
,-12.5000,-21.6506,0.0000
,-9.5671,-23.0970,0.0000
,-6.4705,-24.1481,0.0000
,-3.2631,-24.7861,0.0000
,0.0000,-25.0000,0.0000
,3.2632,-24.7861,0.0000
,6.4705,-24.1481,0.0000
,9.5671,-23.0970,0.0000
,12.5000,-21.6506,0.0000
,15.2191,-19.8338,0.0000
,17.6777,-17.6776,0.0000
,19.8339,-15.2190,0.0000
,21.6507,-12.4999,0.0000
,23.0970,-9.5670,0.0000
,24.1482,-6.4704,0.0000
,24.7861,-3.2631,0.0000
,25.0000,0.0001,0.0000
,24.7861,3.2632,0.0000
,24.1481,6.4706,0.0000
,23.0969,9.5672,0.0000
,21.6506,12.5001,0.0000
,19.8338,15.2191,0.0000
,17.6776,17.6778,0.0000
,15.2189,19.8339,0.0000
,12.4999,21.6507,0.0000
,9.5670,23.0970,0.0000
,6.4703,24.1482,0.0000
,3.2630,24.7861,0.0000
,-0.0000,24.7861,-3.2631
,-3.2352,24.5741,-3.2631
,-6.4151,23.9416,-3.2631
,-9.4852,22.8994,-3.2631
,-12.3931,21.4654,-3.2631
,-15.0888,19.6642,-3.2631
,-17.5264,17.5264,-3.2631
,-19.6642,15.0888,-3.2631
,-21.4654,12.3931,-3.2631
,-22.8994,9.4852,-3.2631
,-23.9416,6.4151,-3.2631
,-24.5741,3.2352,-3.2631
,-24.7861,0.0000,-3.2631
,-24.5741,-3.2352,-3.2631
,-23.9416,-6.4151,-3.2631
,-22.8994,-9.4852,-3.2631
,-21.4654,-12.3931,-3.2631
,-19.6642,-15.0888,-3.2631
,-17.5264,-17.5264,-3.2631
,-15.0888,-19.6642,-3.2631
,-12.3931,-21.4654,-3.2631
,-9.4852,-22.8994,-3.2631
,-6.4151,-23.9416,-3.2631
,-3.2352,-24.5741,-3.2631
,0.0000,-24.7861,-3.2631
,3.2353,-24.5741,-3.2631
,6.4152,-23.9415,-3.2631
,9.4853,-22.8994,-3.2631
,12.3931,-21.4654,-3.2631
,15.0889,-19.6641,-3.2631
,17.5265,-17.5264,-3.2631
,19.6642,-15.0888,-3.2631
,21.4654,-12.3930,-3.2631
,22.8994,-9.4852,-3.2631
,23.9416,-6.4150,-3.2631
,24.5741,-3.2352,-3.2631
,24.7861,0.0001,-3.2631
,24.5741,3.2353,-3.2631
,23.9415,6.4152,-3.2631
,22.8994,9.4853,-3.2631
,21.4654,12.3932,-3.2631
,19.6641,15.0889,-3.2631
,17.5264,17.5265,-3.2631
,15.0887,19.6642,-3.2631
,12.3929,21.4655,-3.2631
,9.4851,22.8994,-3.2631
,6.4150,23.9416,-3.2631
,3.2351,24.5741,-3.2631
,-0.0000,24.1481,-6.4705
,-3.1520,23.9416,-6.4705
,-6.2500,23.3253,-6.4705
,-9.2411,22.3100,-6.4705
,-12.0741,20.9129,-6.4705
,-14.7005,19.1580,-6.4705
,-17.0753,17.0753,-6.4705
,-19.1580,14.7005,-6.4705
,-20.9129,12.0741,-6.4705
,-22.3100,9.2411,-6.4705
,-23.3253,6.2500,-6.4705
,-23.9416,3.1520,-6.4705
,-24.1481,0.0000,-6.4705
,-23.9416,-3.1520,-6.4705
,-23.3253,-6.2500,-6.4705
,-22.3100,-9.2411,-6.4705
,-20.9129,-12.0741,-6.4705
,-19.1580,-14.7005,-6.4705
,-17.0753,-17.0753,-6.4705
,-14.7005,-19.1580,-6.4705
,-12.0741,-20.9129,-6.4705
,-9.2411,-22.3100,-6.4705
,-6.2500,-23.3253,-6.4705
,-3.1519,-23.9416,-6.4705
,0.0000,-24.1481,-6.4705
,3.1520,-23.9416,-6.4705
,6.2500,-23.3253,-6.4705
,9.2411,-22.3100,-6.4705
,12.0741,-20.9129,-6.4705
,14.7005,-19.1580,-6.4705
,17.0754,-17.0753,-6.4705
,19.1580,-14.7004,-6.4705
,20.9129,-12.0740,-6.4705
,22.3100,-9.2410,-6.4705
,23.3253,-6.2499,-6.4705
,23.9416,-3.1519,-6.4705
,24.1481,0.0001,-6.4705
,23.9415,3.1521,-6.4705
,23.3253,6.2501,-6.4705
,22.3099,9.2412,-6.4705
,20.9129,12.0742,-6.4705
,19.1579,14.7005,-6.4705
,17.0752,17.0754,-6.4705
,14.7004,19.1581,-6.4705
,12.0740,20.9130,-6.4705
,9.2410,22.3100,-6.4705
,6.2499,23.3254,-6.4705
,3.1518,23.9416,-6.4705
,-0.0000,23.0970,-9.5671
,-3.0148,22.8994,-9.5671
,-5.9779,22.3100,-9.5671
,-8.8388,21.3388,-9.5671
,-11.5485,20.0026,-9.5671
,-14.0606,18.3241,-9.5671
,-16.3320,16.3320,-9.5671
,-18.3241,14.0606,-9.5671
,-20.0026,11.5485,-9.5671
,-21.3388,8.8388,-9.5671
,-22.3100,5.9779,-9.5671
,-22.8994,3.0148,-9.5671
,-23.0970,0.0000,-9.5671
,-22.8994,-3.0148,-9.5671
,-22.3100,-5.9779,-9.5671
,-21.3388,-8.8388,-9.5671
,-20.0026,-11.5485,-9.5671
,-18.3241,-14.0606,-9.5671
,-16.3320,-16.3320,-9.5671
,-14.0606,-18.3241,-9.5671
,-11.5485,-20.0026,-9.5671
,-8.8388,-21.3388,-9.5671
,-5.9779,-22.3100,-9.5671
,-3.0147,-22.8994,-9.5671
,0.0000,-23.0970,-9.5671
,3.0148,-22.8994,-9.5671
,5.9780,-22.3100,-9.5671
,8.8389,-21.3388,-9.5671
,11.5485,-20.0026,-9.5671
,14.0606,-18.3240,-9.5671
,16.3321,-16.3320,-9.5671
,18.3241,-14.0605,-9.5671
,20.0026,-11.5484,-9.5671
,21.3389,-8.8388,-9.5671
,22.3100,-5.9779,-9.5671
,22.8994,-3.0147,-9.5671
,23.0970,0.0001,-9.5671
,22.8994,3.0148,-9.5671
,22.3100,5.9780,-9.5671
,21.3388,8.8389,-9.5671
,20.0025,11.5486,-9.5671
,18.3240,14.0606,-9.5671
,16.3320,16.3321,-9.5671
,14.0605,18.3241,-9.5671
,11.5484,20.0026,-9.5671
,8.8387,21.3389,-9.5671
,5.9778,22.3100,-9.5671
,3.0146,22.8994,-9.5671
,-0.0000,21.6506,-12.5000
,-2.8260,21.4654,-12.5000
,-5.6036,20.9129,-12.5000
,-8.2853,20.0026,-12.5000
,-10.8253,18.7500,-12.5000
,-13.1801,17.1766,-12.5000
,-15.3093,15.3093,-12.5000
,-17.1766,13.1801,-12.5000
,-18.7500,10.8253,-12.5000
,-20.0026,8.2853,-12.5000
,-20.9129,5.6036,-12.5000
,-21.4654,2.8260,-12.5000
,-21.6506,0.0000,-12.5000
,-21.4654,-2.8260,-12.5000
,-20.9129,-5.6036,-12.5000
,-20.0026,-8.2853,-12.5000
,-18.7500,-10.8253,-12.5000
,-17.1766,-13.1801,-12.5000
,-15.3093,-15.3093,-12.5000
,-13.1801,-17.1766,-12.5000
,-10.8253,-18.7500,-12.5000
,-8.2853,-20.0026,-12.5000
,-5.6036,-20.9129,-12.5000
,-2.8260,-21.4654,-12.5000
,0.0000,-21.6506,-12.5000
,2.8260,-21.4654,-12.5000
,5.6036,-20.9129,-12.5000
,8.2854,-20.0026,-12.5000
,10.8254,-18.7500,-12.5000
,13.1801,-17.1766,-12.5000
,15.3093,-15.3093,-12.5000
,17.1766,-13.1800,-12.5000
,18.7500,-10.8253,-12.5000
,20.0026,-8.2853,-12.5000
,20.9129,-5.6035,-12.5000
,21.4654,-2.8259,-12.5000
,21.6506,0.0001,-12.5000
,21.4654,2.8261,-12.5000
,20.9129,5.6037,-12.5000
,20.0025,8.2854,-12.5000
,18.7500,10.8254,-12.5000
,17.1765,13.1802,-12.5000
,15.3092,15.3094,-12.5000
,13.1800,17.1767,-12.5000
,10.8252,18.7501,-12.5000
,8.2852,20.0026,-12.5000
,5.6035,20.9129,-12.5000
,2.8258,21.4654,-12.5000
,-0.0000,19.8338,-15.2190
,-2.5888,19.6642,-15.2190
,-5.1334,19.1580,-15.2190
,-7.5901,18.3241,-15.2190
,-9.9169,17.1766,-15.2190
,-12.0741,15.7352,-15.2190
,-14.0246,14.0246,-15.2190
,-15.7352,12.0741,-15.2190
,-17.1766,9.9169,-15.2190
,-18.3241,7.5901,-15.2190
,-19.1580,5.1334,-15.2190
,-19.6642,2.5888,-15.2190
,-19.8338,0.0000,-15.2190
,-19.6642,-2.5888,-15.2190
,-19.1580,-5.1334,-15.2190
,-18.3241,-7.5901,-15.2190
,-17.1766,-9.9169,-15.2190
,-15.7352,-12.0741,-15.2190
,-14.0246,-14.0246,-15.2190
,-12.0741,-15.7352,-15.2190
,-9.9169,-17.1766,-15.2190
,-7.5901,-18.3241,-15.2190
,-5.1334,-19.1580,-15.2190
,-2.5888,-19.6642,-15.2190
,0.0000,-19.8338,-15.2190
,2.5889,-19.6642,-15.2190
,5.1334,-19.1580,-15.2190
,7.5901,-18.3241,-15.2190
,9.9169,-17.1766,-15.2190
,12.0741,-15.7352,-15.2190
,14.0247,-14.0246,-15.2190
,15.7353,-12.0740,-15.2190
,17.1766,-9.9169,-15.2190
,18.3241,-7.5900,-15.2190
,19.1580,-5.1333,-15.2190
,19.6642,-2.5888,-15.2190
,19.8338,0.0001,-15.2190
,19.6641,2.5889,-15.2190
,19.1580,5.1335,-15.2190
,18.3240,7.5902,-15.2190
,17.1766,9.9170,-15.2190
,15.7352,12.0741,-15.2190
,14.0246,14.0247,-15.2190
,12.0740,15.7353,-15.2190
,9.9168,17.1767,-15.2190
,7.5900,18.3241,-15.2190
,5.1333,19.1580,-15.2190
,2.5887,19.6642,-15.2190
,-0.0000,17.6777,-17.6777
,-2.3074,17.5264,-17.6777
,-4.5753,17.0753,-17.6777
,-6.7650,16.3320,-17.6777
,-8.8388,15.3093,-17.6777
,-10.7615,14.0246,-17.6777
,-12.5000,12.5000,-17.6777
,-14.0246,10.7615,-17.6777
,-15.3093,8.8388,-17.6777
,-16.3320,6.7650,-17.6777
,-17.0753,4.5753,-17.6777
,-17.5264,2.3074,-17.6777
,-17.6777,0.0000,-17.6777
,-17.5264,-2.3074,-17.6777
,-17.0753,-4.5753,-17.6777
,-16.3320,-6.7649,-17.6777
,-15.3093,-8.8388,-17.6777
,-14.0246,-10.7615,-17.6777
,-12.5000,-12.5000,-17.6777
,-10.7615,-14.0246,-17.6777
,-8.8388,-15.3093,-17.6777
,-6.7649,-16.3320,-17.6777
,-4.5753,-17.0753,-17.6777
,-2.3074,-17.5264,-17.6777
,0.0000,-17.6777,-17.6777
,2.3074,-17.5264,-17.6777
,4.5753,-17.0753,-17.6777
,6.7650,-16.3320,-17.6777
,8.8389,-15.3093,-17.6777
,10.7615,-14.0246,-17.6777
,12.5000,-12.5000,-17.6777
,14.0247,-10.7615,-17.6777
,15.3093,-8.8388,-17.6777
,16.3321,-6.7649,-17.6777
,17.0753,-4.5753,-17.6777
,17.5264,-2.3073,-17.6777
,17.6777,0.0001,-17.6777
,17.5264,2.3075,-17.6777
,17.0753,4.5754,-17.6777
,16.3320,6.7650,-17.6777
,15.3093,8.8389,-17.6777
,14.0246,10.7615,-17.6777
,12.4999,12.5001,-17.6777
,10.7614,14.0247,-17.6777
,8.8388,15.3094,-17.6777
,6.7649,16.3321,-17.6777
,4.5752,17.0753,-17.6777
,2.3073,17.5265,-17.6777
,-0.0000,15.2190,-19.8338
,-1.9865,15.0888,-19.8338
,-3.9390,14.7005,-19.8338
,-5.8241,14.0606,-19.8338
,-7.6095,13.1801,-19.8338
,-9.2648,12.0741,-19.8338
,-10.7615,10.7615,-19.8338
,-12.0741,9.2648,-19.8338
,-13.1801,7.6095,-19.8338
,-14.0606,5.8241,-19.8338
,-14.7005,3.9390,-19.8338
,-15.0888,1.9865,-19.8338
,-15.2190,0.0000,-19.8338
,-15.0888,-1.9865,-19.8338
,-14.7005,-3.9390,-19.8338
,-14.0606,-5.8241,-19.8338
,-13.1801,-7.6095,-19.8338
,-12.0741,-9.2648,-19.8338
,-10.7615,-10.7615,-19.8338
,-9.2648,-12.0741,-19.8338
,-7.6095,-13.1801,-19.8338
,-5.8241,-14.0606,-19.8338
,-3.9390,-14.7005,-19.8338
,-1.9865,-15.0888,-19.8338
,0.0000,-15.2190,-19.8338
,1.9865,-15.0888,-19.8338
,3.9390,-14.7005,-19.8338
,5.8241,-14.0606,-19.8338
,7.6095,-13.1801,-19.8338
,9.2648,-12.0741,-19.8338
,10.7615,-10.7615,-19.8338
,12.0741,-9.2647,-19.8338
,13.1801,-7.6095,-19.8338
,14.0606,-5.8240,-19.8338
,14.7005,-3.9389,-19.8338
,15.0888,-1.9864,-19.8338
,15.2190,0.0001,-19.8338
,15.0888,1.9865,-19.8338
,14.7004,3.9390,-19.8338
,14.0605,5.8241,-19.8338
,13.1800,7.6096,-19.8338
,12.0740,9.2648,-19.8338
,10.7614,10.7615,-19.8338
,9.2647,12.0741,-19.8338
,7.6095,13.1801,-19.8338
,5.8240,14.0606,-19.8338
,3.9389,14.7005,-19.8338
,1.9864,15.0889,-19.8338
,-0.0000,12.5000,-21.6506
,-1.6316,12.3931,-21.6506
,-3.2352,12.0741,-21.6506
,-4.7835,11.5485,-21.6506
,-6.2500,10.8253,-21.6506
,-7.6095,9.9169,-21.6506
,-8.8388,8.8388,-21.6506
,-9.9169,7.6095,-21.6506
,-10.8253,6.2500,-21.6506
,-11.5485,4.7835,-21.6506
,-12.0741,3.2352,-21.6506
,-12.3931,1.6316,-21.6506
,-12.5000,0.0000,-21.6506
,-12.3931,-1.6316,-21.6506
,-12.0741,-3.2352,-21.6506
,-11.5485,-4.7835,-21.6506
,-10.8253,-6.2500,-21.6506
,-9.9169,-7.6095,-21.6506
,-8.8388,-8.8388,-21.6506
,-7.6095,-9.9169,-21.6506
,-6.2500,-10.8253,-21.6506
,-4.7835,-11.5485,-21.6506
,-3.2352,-12.0741,-21.6506
,-1.6316,-12.3931,-21.6506
,0.0000,-12.5000,-21.6506
,1.6316,-12.3931,-21.6506
,3.2353,-12.0741,-21.6506
,4.7836,-11.5485,-21.6506
,6.2500,-10.8253,-21.6506
,7.6095,-9.9169,-21.6506
,8.8389,-8.8388,-21.6506
,9.9169,-7.6095,-21.6506
,10.8253,-6.2500,-21.6506
,11.5485,-4.7835,-21.6506
,12.0741,-3.2352,-21.6506
,12.3931,-1.6315,-21.6506
,12.5000,0.0000,-21.6506
,12.3931,1.6316,-21.6506
,12.0741,3.2353,-21.6506
,11.5485,4.7836,-21.6506
,10.8253,6.2501,-21.6506
,9.9169,7.6096,-21.6506
,8.8388,8.8389,-21.6506
,7.6095,9.9170,-21.6506
,6.2499,10.8254,-21.6506
,4.7835,11.5485,-21.6506
,3.2352,12.0741,-21.6506
,1.6315,12.3931,-21.6506
,-0.0000,9.5671,-23.0970
,-1.2488,9.4852,-23.0970
,-2.4761,9.2411,-23.0970
,-3.6612,8.8388,-23.0970
,-4.7835,8.2853,-23.0970
,-5.8241,7.5901,-23.0970
,-6.7650,6.7650,-23.0970
,-7.5901,5.8241,-23.0970
,-8.2853,4.7835,-23.0970
,-8.8388,3.6612,-23.0970
,-9.2411,2.4761,-23.0970
,-9.4852,1.2488,-23.0970
,-9.5671,0.0000,-23.0970
,-9.4852,-1.2488,-23.0970
,-9.2411,-2.4761,-23.0970
,-8.8388,-3.6612,-23.0970
,-8.2853,-4.7835,-23.0970
,-7.5901,-5.8241,-23.0970
,-6.7650,-6.7650,-23.0970
,-5.8241,-7.5901,-23.0970
,-4.7835,-8.2853,-23.0970
,-3.6612,-8.8388,-23.0970
,-2.4761,-9.2411,-23.0970
,-1.2487,-9.4852,-23.0970
,0.0000,-9.5671,-23.0970
,1.2488,-9.4852,-23.0970
,2.4762,-9.2411,-23.0970
,3.6612,-8.8388,-23.0970
,4.7836,-8.2853,-23.0970
,5.8241,-7.5901,-23.0970
,6.7650,-6.7649,-23.0970
,7.5901,-5.8241,-23.0970
,8.2854,-4.7835,-23.0970
,8.8389,-3.6611,-23.0970
,9.2411,-2.4761,-23.0970
,9.4852,-1.2487,-23.0970
,9.5671,0.0000,-23.0970
,9.4852,1.2488,-23.0970
,9.2411,2.4762,-23.0970
,8.8388,3.6612,-23.0970
,8.2853,4.7836,-23.0970
,7.5901,5.8241,-23.0970
,6.7649,6.7650,-23.0970
,5.8240,7.5901,-23.0970
,4.7835,8.2854,-23.0970
,3.6611,8.8389,-23.0970
,2.4761,9.2411,-23.0970
,1.2487,9.4853,-23.0970
,-0.0000,6.4705,-24.1481
,-0.8446,6.4151,-24.1481
,-1.6747,6.2500,-24.1481
,-2.4761,5.9779,-24.1481
,-3.2352,5.6036,-24.1481
,-3.9390,5.1334,-24.1481
,-4.5753,4.5753,-24.1481
,-5.1334,3.9390,-24.1481
,-5.6036,3.2352,-24.1481
,-5.9779,2.4761,-24.1481
,-6.2500,1.6747,-24.1481
,-6.4151,0.8446,-24.1481
,-6.4705,0.0000,-24.1481
,-6.4151,-0.8446,-24.1481
,-6.2500,-1.6747,-24.1481
,-5.9779,-2.4761,-24.1481
,-5.6036,-3.2352,-24.1481
,-5.1334,-3.9390,-24.1481
,-4.5753,-4.5753,-24.1481
,-3.9390,-5.1334,-24.1481
,-3.2352,-5.6036,-24.1481
,-2.4761,-5.9779,-24.1481
,-1.6747,-6.2500,-24.1481
,-0.8446,-6.4151,-24.1481
,0.0000,-6.4705,-24.1481
,0.8446,-6.4151,-24.1481
,1.6747,-6.2500,-24.1481
,2.4762,-5.9779,-24.1481
,3.2353,-5.6036,-24.1481
,3.9390,-5.1334,-24.1481
,4.5753,-4.5753,-24.1481
,5.1334,-3.9390,-24.1481
,5.6036,-3.2352,-24.1481
,5.9780,-2.4761,-24.1481
,6.2500,-1.6747,-24.1481
,6.4151,-0.8445,-24.1481
,6.4705,0.0000,-24.1481
,6.4151,0.8446,-24.1481
,6.2500,1.6747,-24.1481
,5.9779,2.4762,-24.1481
,5.6036,3.2353,-24.1481
,5.1334,3.9390,-24.1481
,4.5753,4.5753,-24.1481
,3.9390,5.1334,-24.1481
,3.2352,5.6036,-24.1481
,2.4761,5.9780,-24.1481
,1.6746,6.2500,-24.1481
,0.8445,6.4151,-24.1481
,-0.0000,3.2632,-24.7861
,-0.4259,3.2352,-24.7861
,-0.8446,3.1520,-24.7861
,-1.2488,3.0148,-24.7861
,-1.6316,2.8260,-24.7861
,-1.9865,2.5888,-24.7861
,-2.3074,2.3074,-24.7861
,-2.5888,1.9865,-24.7861
,-2.8260,1.6316,-24.7861
,-3.0148,1.2488,-24.7861
,-3.1520,0.8446,-24.7861
,-3.2352,0.4259,-24.7861
,-3.2632,0.0000,-24.7861
,-3.2352,-0.4259,-24.7861
,-3.1520,-0.8446,-24.7861
,-3.0148,-1.2488,-24.7861
,-2.8260,-1.6316,-24.7861
,-2.5888,-1.9865,-24.7861
,-2.3074,-2.3074,-24.7861
,-1.9865,-2.5888,-24.7861
,-1.6316,-2.8260,-24.7861
,-1.2488,-3.0148,-24.7861
,-0.8446,-3.1520,-24.7861
,-0.4259,-3.2352,-24.7861
,0.0000,-3.2632,-24.7861
,0.4259,-3.2352,-24.7861
,0.8446,-3.1520,-24.7861
,1.2488,-3.0148,-24.7861
,1.6316,-2.8260,-24.7861
,1.9865,-2.5888,-24.7861
,2.3074,-2.3074,-24.7861
,2.5888,-1.9865,-24.7861
,2.8260,-1.6316,-24.7861
,3.0148,-1.2488,-24.7861
,3.1520,-0.8446,-24.7861
,3.2352,-0.4259,-24.7861
,3.2632,0.0000,-24.7861
,3.2352,0.4259,-24.7861
,3.1520,0.8446,-24.7861
,3.0148,1.2488,-24.7861
,2.8260,1.6316,-24.7861
,2.5888,1.9865,-24.7861
,2.3074,2.3074,-24.7861
,1.9865,2.5889,-24.7861
,1.6316,2.8260,-24.7861
,1.2487,3.0148,-24.7861
,0.8446,3.1520,-24.7861
,0.4259,3.2352,-24.7861
,0.0000,0.0000,-25.0000};

int sphereFacetList[]={1,2,3,
1,3,4,
1,4,5,
1,5,6,
1,6,7,
1,7,8,
1,8,9,
1,9,10,
1,10,11,
1,11,12,
1,12,13,
1,13,14,
1,14,15,
1,15,16,
1,16,17,
1,17,18,
1,18,19,
1,19,20,
1,20,21,
1,21,22,
1,22,23,
1,23,24,
1,24,25,
1,25,26,
1,26,27,
1,27,28,
1,28,29,
1,29,30,
1,30,31,
1,31,32,
1,32,33,
1,33,34,
1,34,35,
1,35,36,
1,36,37,
1,37,38,
1,38,39,
1,39,40,
1,40,41,
1,41,42,
1,42,43,
1,43,44,
1,44,45,
1,45,46,
1,46,47,
1,47,48,
1,48,49,
1,49,2,
2,50,51,
2,51,3,
3,51,52,
3,52,4,
4,52,53,
4,53,5,
5,53,54,
5,54,6,
6,54,55,
6,55,7,
7,55,56,
7,56,8,
8,56,57,
8,57,9,
9,57,58,
9,58,10,
10,58,59,
10,59,11,
11,59,60,
11,60,12,
12,60,61,
12,61,13,
13,61,62,
13,62,14,
14,62,63,
14,63,15,
15,63,64,
15,64,16,
16,64,65,
16,65,17,
17,65,66,
17,66,18,
18,66,67,
18,67,19,
19,67,68,
19,68,20,
20,68,69,
20,69,21,
21,69,70,
21,70,22,
22,70,71,
22,71,23,
23,71,72,
23,72,24,
24,72,73,
24,73,25,
25,73,74,
25,74,26,
26,74,75,
26,75,27,
27,75,76,
27,76,28,
28,76,77,
28,77,29,
29,77,78,
29,78,30,
30,78,79,
30,79,31,
31,79,80,
31,80,32,
32,80,81,
32,81,33,
33,81,82,
33,82,34,
34,82,83,
34,83,35,
35,83,84,
35,84,36,
36,84,85,
36,85,37,
37,85,86,
37,86,38,
38,86,87,
38,87,39,
39,87,88,
39,88,40,
40,88,89,
40,89,41,
41,89,90,
41,90,42,
42,90,91,
42,91,43,
43,91,92,
43,92,44,
44,92,93,
44,93,45,
45,93,94,
45,94,46,
46,94,95,
46,95,47,
47,95,96,
47,96,48,
48,96,97,
48,97,49,
49,97,50,
49,50,2,
50,98,99,
50,99,51,
51,99,100,
51,100,52,
52,100,101,
52,101,53,
53,101,102,
53,102,54,
54,102,103,
54,103,55,
55,103,104,
55,104,56,
56,104,105,
56,105,57,
57,105,106,
57,106,58,
58,106,107,
58,107,59,
59,107,108,
59,108,60,
60,108,109,
60,109,61,
61,109,110,
61,110,62,
62,110,111,
62,111,63,
63,111,112,
63,112,64,
64,112,113,
64,113,65,
65,113,114,
65,114,66,
66,114,115,
66,115,67,
67,115,116,
67,116,68,
68,116,117,
68,117,69,
69,117,118,
69,118,70,
70,118,119,
70,119,71,
71,119,120,
71,120,72,
72,120,121,
72,121,73,
73,121,122,
73,122,74,
74,122,123,
74,123,75,
75,123,124,
75,124,76,
76,124,125,
76,125,77,
77,125,126,
77,126,78,
78,126,127,
78,127,79,
79,127,128,
79,128,80,
80,128,129,
80,129,81,
81,129,130,
81,130,82,
82,130,131,
82,131,83,
83,131,132,
83,132,84,
84,132,133,
84,133,85,
85,133,134,
85,134,86,
86,134,135,
86,135,87,
87,135,136,
87,136,88,
88,136,137,
88,137,89,
89,137,138,
89,138,90,
90,138,139,
90,139,91,
91,139,140,
91,140,92,
92,140,141,
92,141,93,
93,141,142,
93,142,94,
94,142,143,
94,143,95,
95,143,144,
95,144,96,
96,144,145,
96,145,97,
97,145,98,
97,98,50,
98,146,147,
98,147,99,
99,147,148,
99,148,100,
100,148,149,
100,149,101,
101,149,150,
101,150,102,
102,150,151,
102,151,103,
103,151,152,
103,152,104,
104,152,153,
104,153,105,
105,153,154,
105,154,106,
106,154,155,
106,155,107,
107,155,156,
107,156,108,
108,156,157,
108,157,109,
109,157,158,
109,158,110,
110,158,159,
110,159,111,
111,159,160,
111,160,112,
112,160,161,
112,161,113,
113,161,162,
113,162,114,
114,162,163,
114,163,115,
115,163,164,
115,164,116,
116,164,165,
116,165,117,
117,165,166,
117,166,118,
118,166,167,
118,167,119,
119,167,168,
119,168,120,
120,168,169,
120,169,121,
121,169,170,
121,170,122,
122,170,171,
122,171,123,
123,171,172,
123,172,124,
124,172,173,
124,173,125,
125,173,174,
125,174,126,
126,174,175,
126,175,127,
127,175,176,
127,176,128,
128,176,177,
128,177,129,
129,177,178,
129,178,130,
130,178,179,
130,179,131,
131,179,180,
131,180,132,
132,180,181,
132,181,133,
133,181,182,
133,182,134,
134,182,183,
134,183,135,
135,183,184,
135,184,136,
136,184,185,
136,185,137,
137,185,186,
137,186,138,
138,186,187,
138,187,139,
139,187,188,
139,188,140,
140,188,189,
140,189,141,
141,189,190,
141,190,142,
142,190,191,
142,191,143,
143,191,192,
143,192,144,
144,192,193,
144,193,145,
145,193,146,
145,146,98,
146,194,195,
146,195,147,
147,195,196,
147,196,148,
148,196,197,
148,197,149,
149,197,198,
149,198,150,
150,198,199,
150,199,151,
151,199,200,
151,200,152,
152,200,201,
152,201,153,
153,201,202,
153,202,154,
154,202,203,
154,203,155,
155,203,204,
155,204,156,
156,204,205,
156,205,157,
157,205,206,
157,206,158,
158,206,207,
158,207,159,
159,207,208,
159,208,160,
160,208,209,
160,209,161,
161,209,210,
161,210,162,
162,210,211,
162,211,163,
163,211,212,
163,212,164,
164,212,213,
164,213,165,
165,213,214,
165,214,166,
166,214,215,
166,215,167,
167,215,216,
167,216,168,
168,216,217,
168,217,169,
169,217,218,
169,218,170,
170,218,219,
170,219,171,
171,219,220,
171,220,172,
172,220,221,
172,221,173,
173,221,222,
173,222,174,
174,222,223,
174,223,175,
175,223,224,
175,224,176,
176,224,225,
176,225,177,
177,225,226,
177,226,178,
178,226,227,
178,227,179,
179,227,228,
179,228,180,
180,228,229,
180,229,181,
181,229,230,
181,230,182,
182,230,231,
182,231,183,
183,231,232,
183,232,184,
184,232,233,
184,233,185,
185,233,234,
185,234,186,
186,234,235,
186,235,187,
187,235,236,
187,236,188,
188,236,237,
188,237,189,
189,237,238,
189,238,190,
190,238,239,
190,239,191,
191,239,240,
191,240,192,
192,240,241,
192,241,193,
193,241,194,
193,194,146,
194,242,243,
194,243,195,
195,243,244,
195,244,196,
196,244,245,
196,245,197,
197,245,246,
197,246,198,
198,246,247,
198,247,199,
199,247,248,
199,248,200,
200,248,249,
200,249,201,
201,249,250,
201,250,202,
202,250,251,
202,251,203,
203,251,252,
203,252,204,
204,252,253,
204,253,205,
205,253,254,
205,254,206,
206,254,255,
206,255,207,
207,255,256,
207,256,208,
208,256,257,
208,257,209,
209,257,258,
209,258,210,
210,258,259,
210,259,211,
211,259,260,
211,260,212,
212,260,261,
212,261,213,
213,261,262,
213,262,214,
214,262,263,
214,263,215,
215,263,264,
215,264,216,
216,264,265,
216,265,217,
217,265,266,
217,266,218,
218,266,267,
218,267,219,
219,267,268,
219,268,220,
220,268,269,
220,269,221,
221,269,270,
221,270,222,
222,270,271,
222,271,223,
223,271,272,
223,272,224,
224,272,273,
224,273,225,
225,273,274,
225,274,226,
226,274,275,
226,275,227,
227,275,276,
227,276,228,
228,276,277,
228,277,229,
229,277,278,
229,278,230,
230,278,279,
230,279,231,
231,279,280,
231,280,232,
232,280,281,
232,281,233,
233,281,282,
233,282,234,
234,282,283,
234,283,235,
235,283,284,
235,284,236,
236,284,285,
236,285,237,
237,285,286,
237,286,238,
238,286,287,
238,287,239,
239,287,288,
239,288,240,
240,288,289,
240,289,241,
241,289,242,
241,242,194,
242,290,291,
242,291,243,
243,291,292,
243,292,244,
244,292,293,
244,293,245,
245,293,294,
245,294,246,
246,294,295,
246,295,247,
247,295,296,
247,296,248,
248,296,297,
248,297,249,
249,297,298,
249,298,250,
250,298,299,
250,299,251,
251,299,300,
251,300,252,
252,300,301,
252,301,253,
253,301,302,
253,302,254,
254,302,303,
254,303,255,
255,303,304,
255,304,256,
256,304,305,
256,305,257,
257,305,306,
257,306,258,
258,306,307,
258,307,259,
259,307,308,
259,308,260,
260,308,309,
260,309,261,
261,309,310,
261,310,262,
262,310,311,
262,311,263,
263,311,312,
263,312,264,
264,312,313,
264,313,265,
265,313,314,
265,314,266,
266,314,315,
266,315,267,
267,315,316,
267,316,268,
268,316,317,
268,317,269,
269,317,318,
269,318,270,
270,318,319,
270,319,271,
271,319,320,
271,320,272,
272,320,321,
272,321,273,
273,321,322,
273,322,274,
274,322,323,
274,323,275,
275,323,324,
275,324,276,
276,324,325,
276,325,277,
277,325,326,
277,326,278,
278,326,327,
278,327,279,
279,327,328,
279,328,280,
280,328,329,
280,329,281,
281,329,330,
281,330,282,
282,330,331,
282,331,283,
283,331,332,
283,332,284,
284,332,333,
284,333,285,
285,333,334,
285,334,286,
286,334,335,
286,335,287,
287,335,336,
287,336,288,
288,336,337,
288,337,289,
289,337,290,
289,290,242,
290,338,339,
290,339,291,
291,339,340,
291,340,292,
292,340,341,
292,341,293,
293,341,342,
293,342,294,
294,342,343,
294,343,295,
295,343,344,
295,344,296,
296,344,345,
296,345,297,
297,345,346,
297,346,298,
298,346,347,
298,347,299,
299,347,348,
299,348,300,
300,348,349,
300,349,301,
301,349,350,
301,350,302,
302,350,351,
302,351,303,
303,351,352,
303,352,304,
304,352,353,
304,353,305,
305,353,354,
305,354,306,
306,354,355,
306,355,307,
307,355,356,
307,356,308,
308,356,357,
308,357,309,
309,357,358,
309,358,310,
310,358,359,
310,359,311,
311,359,360,
311,360,312,
312,360,361,
312,361,313,
313,361,362,
313,362,314,
314,362,363,
314,363,315,
315,363,364,
315,364,316,
316,364,365,
316,365,317,
317,365,366,
317,366,318,
318,366,367,
318,367,319,
319,367,368,
319,368,320,
320,368,369,
320,369,321,
321,369,370,
321,370,322,
322,370,371,
322,371,323,
323,371,372,
323,372,324,
324,372,373,
324,373,325,
325,373,374,
325,374,326,
326,374,375,
326,375,327,
327,375,376,
327,376,328,
328,376,377,
328,377,329,
329,377,378,
329,378,330,
330,378,379,
330,379,331,
331,379,380,
331,380,332,
332,380,381,
332,381,333,
333,381,382,
333,382,334,
334,382,383,
334,383,335,
335,383,384,
335,384,336,
336,384,385,
336,385,337,
337,385,338,
337,338,290,
338,386,387,
338,387,339,
339,387,388,
339,388,340,
340,388,389,
340,389,341,
341,389,390,
341,390,342,
342,390,391,
342,391,343,
343,391,392,
343,392,344,
344,392,393,
344,393,345,
345,393,394,
345,394,346,
346,394,395,
346,395,347,
347,395,396,
347,396,348,
348,396,397,
348,397,349,
349,397,398,
349,398,350,
350,398,399,
350,399,351,
351,399,400,
351,400,352,
352,400,401,
352,401,353,
353,401,402,
353,402,354,
354,402,403,
354,403,355,
355,403,404,
355,404,356,
356,404,405,
356,405,357,
357,405,406,
357,406,358,
358,406,407,
358,407,359,
359,407,408,
359,408,360,
360,408,409,
360,409,361,
361,409,410,
361,410,362,
362,410,411,
362,411,363,
363,411,412,
363,412,364,
364,412,413,
364,413,365,
365,413,414,
365,414,366,
366,414,415,
366,415,367,
367,415,416,
367,416,368,
368,416,417,
368,417,369,
369,417,418,
369,418,370,
370,418,419,
370,419,371,
371,419,420,
371,420,372,
372,420,421,
372,421,373,
373,421,422,
373,422,374,
374,422,423,
374,423,375,
375,423,424,
375,424,376,
376,424,425,
376,425,377,
377,425,426,
377,426,378,
378,426,427,
378,427,379,
379,427,428,
379,428,380,
380,428,429,
380,429,381,
381,429,430,
381,430,382,
382,430,431,
382,431,383,
383,431,432,
383,432,384,
384,432,433,
384,433,385,
385,433,386,
385,386,338,
386,434,435,
386,435,387,
387,435,436,
387,436,388,
388,436,437,
388,437,389,
389,437,438,
389,438,390,
390,438,439,
390,439,391,
391,439,440,
391,440,392,
392,440,441,
392,441,393,
393,441,442,
393,442,394,
394,442,443,
394,443,395,
395,443,444,
395,444,396,
396,444,445,
396,445,397,
397,445,446,
397,446,398,
398,446,447,
398,447,399,
399,447,448,
399,448,400,
400,448,449,
400,449,401,
401,449,450,
401,450,402,
402,450,451,
402,451,403,
403,451,452,
403,452,404,
404,452,453,
404,453,405,
405,453,454,
405,454,406,
406,454,455,
406,455,407,
407,455,456,
407,456,408,
408,456,457,
408,457,409,
409,457,458,
409,458,410,
410,458,459,
410,459,411,
411,459,460,
411,460,412,
412,460,461,
412,461,413,
413,461,462,
413,462,414,
414,462,463,
414,463,415,
415,463,464,
415,464,416,
416,464,465,
416,465,417,
417,465,466,
417,466,418,
418,466,467,
418,467,419,
419,467,468,
419,468,420,
420,468,469,
420,469,421,
421,469,470,
421,470,422,
422,470,471,
422,471,423,
423,471,472,
423,472,424,
424,472,473,
424,473,425,
425,473,474,
425,474,426,
426,474,475,
426,475,427,
427,475,476,
427,476,428,
428,476,477,
428,477,429,
429,477,478,
429,478,430,
430,478,479,
430,479,431,
431,479,480,
431,480,432,
432,480,481,
432,481,433,
433,481,434,
433,434,386,
434,482,483,
434,483,435,
435,483,484,
435,484,436,
436,484,485,
436,485,437,
437,485,486,
437,486,438,
438,486,487,
438,487,439,
439,487,488,
439,488,440,
440,488,489,
440,489,441,
441,489,490,
441,490,442,
442,490,491,
442,491,443,
443,491,492,
443,492,444,
444,492,493,
444,493,445,
445,493,494,
445,494,446,
446,494,495,
446,495,447,
447,495,496,
447,496,448,
448,496,497,
448,497,449,
449,497,498,
449,498,450,
450,498,499,
450,499,451,
451,499,500,
451,500,452,
452,500,501,
452,501,453,
453,501,502,
453,502,454,
454,502,503,
454,503,455,
455,503,504,
455,504,456,
456,504,505,
456,505,457,
457,505,506,
457,506,458,
458,506,507,
458,507,459,
459,507,508,
459,508,460,
460,508,509,
460,509,461,
461,509,510,
461,510,462,
462,510,511,
462,511,463,
463,511,512,
463,512,464,
464,512,513,
464,513,465,
465,513,514,
465,514,466,
466,514,515,
466,515,467,
467,515,516,
467,516,468,
468,516,517,
468,517,469,
469,517,518,
469,518,470,
470,518,519,
470,519,471,
471,519,520,
471,520,472,
472,520,521,
472,521,473,
473,521,522,
473,522,474,
474,522,523,
474,523,475,
475,523,524,
475,524,476,
476,524,525,
476,525,477,
477,525,526,
477,526,478,
478,526,527,
478,527,479,
479,527,528,
479,528,480,
480,528,529,
480,529,481,
481,529,482,
481,482,434,
482,530,531,
482,531,483,
483,531,532,
483,532,484,
484,532,533,
484,533,485,
485,533,534,
485,534,486,
486,534,535,
486,535,487,
487,535,536,
487,536,488,
488,536,537,
488,537,489,
489,537,538,
489,538,490,
490,538,539,
490,539,491,
491,539,540,
491,540,492,
492,540,541,
492,541,493,
493,541,542,
493,542,494,
494,542,543,
494,543,495,
495,543,544,
495,544,496,
496,544,545,
496,545,497,
497,545,546,
497,546,498,
498,546,547,
498,547,499,
499,547,548,
499,548,500,
500,548,549,
500,549,501,
501,549,550,
501,550,502,
502,550,551,
502,551,503,
503,551,552,
503,552,504,
504,552,553,
504,553,505,
505,553,554,
505,554,506,
506,554,555,
506,555,507,
507,555,556,
507,556,508,
508,556,557,
508,557,509,
509,557,558,
509,558,510,
510,558,559,
510,559,511,
511,559,560,
511,560,512,
512,560,561,
512,561,513,
513,561,562,
513,562,514,
514,562,563,
514,563,515,
515,563,564,
515,564,516,
516,564,565,
516,565,517,
517,565,566,
517,566,518,
518,566,567,
518,567,519,
519,567,568,
519,568,520,
520,568,569,
520,569,521,
521,569,570,
521,570,522,
522,570,571,
522,571,523,
523,571,572,
523,572,524,
524,572,573,
524,573,525,
525,573,574,
525,574,526,
526,574,575,
526,575,527,
527,575,576,
527,576,528,
528,576,577,
528,577,529,
529,577,530,
529,530,482,
530,578,579,
530,579,531,
531,579,580,
531,580,532,
532,580,581,
532,581,533,
533,581,582,
533,582,534,
534,582,583,
534,583,535,
535,583,584,
535,584,536,
536,584,585,
536,585,537,
537,585,586,
537,586,538,
538,586,587,
538,587,539,
539,587,588,
539,588,540,
540,588,589,
540,589,541,
541,589,590,
541,590,542,
542,590,591,
542,591,543,
543,591,592,
543,592,544,
544,592,593,
544,593,545,
545,593,594,
545,594,546,
546,594,595,
546,595,547,
547,595,596,
547,596,548,
548,596,597,
548,597,549,
549,597,598,
549,598,550,
550,598,599,
550,599,551,
551,599,600,
551,600,552,
552,600,601,
552,601,553,
553,601,602,
553,602,554,
554,602,603,
554,603,555,
555,603,604,
555,604,556,
556,604,605,
556,605,557,
557,605,606,
557,606,558,
558,606,607,
558,607,559,
559,607,608,
559,608,560,
560,608,609,
560,609,561,
561,609,610,
561,610,562,
562,610,611,
562,611,563,
563,611,612,
563,612,564,
564,612,613,
564,613,565,
565,613,614,
565,614,566,
566,614,615,
566,615,567,
567,615,616,
567,616,568,
568,616,617,
568,617,569,
569,617,618,
569,618,570,
570,618,619,
570,619,571,
571,619,620,
571,620,572,
572,620,621,
572,621,573,
573,621,622,
573,622,574,
574,622,623,
574,623,575,
575,623,624,
575,624,576,
576,624,625,
576,625,577,
577,625,578,
577,578,530,
578,626,627,
578,627,579,
579,627,628,
579,628,580,
580,628,629,
580,629,581,
581,629,630,
581,630,582,
582,630,631,
582,631,583,
583,631,632,
583,632,584,
584,632,633,
584,633,585,
585,633,634,
585,634,586,
586,634,635,
586,635,587,
587,635,636,
587,636,588,
588,636,637,
588,637,589,
589,637,638,
589,638,590,
590,638,639,
590,639,591,
591,639,640,
591,640,592,
592,640,641,
592,641,593,
593,641,642,
593,642,594,
594,642,643,
594,643,595,
595,643,644,
595,644,596,
596,644,645,
596,645,597,
597,645,646,
597,646,598,
598,646,647,
598,647,599,
599,647,648,
599,648,600,
600,648,649,
600,649,601,
601,649,650,
601,650,602,
602,650,651,
602,651,603,
603,651,652,
603,652,604,
604,652,653,
604,653,605,
605,653,654,
605,654,606,
606,654,655,
606,655,607,
607,655,656,
607,656,608,
608,656,657,
608,657,609,
609,657,658,
609,658,610,
610,658,659,
610,659,611,
611,659,660,
611,660,612,
612,660,661,
612,661,613,
613,661,662,
613,662,614,
614,662,663,
614,663,615,
615,663,664,
615,664,616,
616,664,665,
616,665,617,
617,665,666,
617,666,618,
618,666,667,
618,667,619,
619,667,668,
619,668,620,
620,668,669,
620,669,621,
621,669,670,
621,670,622,
622,670,671,
622,671,623,
623,671,672,
623,672,624,
624,672,673,
624,673,625,
625,673,626,
625,626,578,
626,674,675,
626,675,627,
627,675,676,
627,676,628,
628,676,677,
628,677,629,
629,677,678,
629,678,630,
630,678,679,
630,679,631,
631,679,680,
631,680,632,
632,680,681,
632,681,633,
633,681,682,
633,682,634,
634,682,683,
634,683,635,
635,683,684,
635,684,636,
636,684,685,
636,685,637,
637,685,686,
637,686,638,
638,686,687,
638,687,639,
639,687,688,
639,688,640,
640,688,689,
640,689,641,
641,689,690,
641,690,642,
642,690,691,
642,691,643,
643,691,692,
643,692,644,
644,692,693,
644,693,645,
645,693,694,
645,694,646,
646,694,695,
646,695,647,
647,695,696,
647,696,648,
648,696,697,
648,697,649,
649,697,698,
649,698,650,
650,698,699,
650,699,651,
651,699,700,
651,700,652,
652,700,701,
652,701,653,
653,701,702,
653,702,654,
654,702,703,
654,703,655,
655,703,704,
655,704,656,
656,704,705,
656,705,657,
657,705,706,
657,706,658,
658,706,707,
658,707,659,
659,707,708,
659,708,660,
660,708,709,
660,709,661,
661,709,710,
661,710,662,
662,710,711,
662,711,663,
663,711,712,
663,712,664,
664,712,713,
664,713,665,
665,713,714,
665,714,666,
666,714,715,
666,715,667,
667,715,716,
667,716,668,
668,716,717,
668,717,669,
669,717,718,
669,718,670,
670,718,719,
670,719,671,
671,719,720,
671,720,672,
672,720,721,
672,721,673,
673,721,674,
673,674,626,
674,722,723,
674,723,675,
675,723,724,
675,724,676,
676,724,725,
676,725,677,
677,725,726,
677,726,678,
678,726,727,
678,727,679,
679,727,728,
679,728,680,
680,728,729,
680,729,681,
681,729,730,
681,730,682,
682,730,731,
682,731,683,
683,731,732,
683,732,684,
684,732,733,
684,733,685,
685,733,734,
685,734,686,
686,734,735,
686,735,687,
687,735,736,
687,736,688,
688,736,737,
688,737,689,
689,737,738,
689,738,690,
690,738,739,
690,739,691,
691,739,740,
691,740,692,
692,740,741,
692,741,693,
693,741,742,
693,742,694,
694,742,743,
694,743,695,
695,743,744,
695,744,696,
696,744,745,
696,745,697,
697,745,746,
697,746,698,
698,746,747,
698,747,699,
699,747,748,
699,748,700,
700,748,749,
700,749,701,
701,749,750,
701,750,702,
702,750,751,
702,751,703,
703,751,752,
703,752,704,
704,752,753,
704,753,705,
705,753,754,
705,754,706,
706,754,755,
706,755,707,
707,755,756,
707,756,708,
708,756,757,
708,757,709,
709,757,758,
709,758,710,
710,758,759,
710,759,711,
711,759,760,
711,760,712,
712,760,761,
712,761,713,
713,761,762,
713,762,714,
714,762,763,
714,763,715,
715,763,764,
715,764,716,
716,764,765,
716,765,717,
717,765,766,
717,766,718,
718,766,767,
718,767,719,
719,767,768,
719,768,720,
720,768,769,
720,769,721,
721,769,722,
721,722,674,
722,770,771,
722,771,723,
723,771,772,
723,772,724,
724,772,773,
724,773,725,
725,773,774,
725,774,726,
726,774,775,
726,775,727,
727,775,776,
727,776,728,
728,776,777,
728,777,729,
729,777,778,
729,778,730,
730,778,779,
730,779,731,
731,779,780,
731,780,732,
732,780,781,
732,781,733,
733,781,782,
733,782,734,
734,782,783,
734,783,735,
735,783,784,
735,784,736,
736,784,785,
736,785,737,
737,785,786,
737,786,738,
738,786,787,
738,787,739,
739,787,788,
739,788,740,
740,788,789,
740,789,741,
741,789,790,
741,790,742,
742,790,791,
742,791,743,
743,791,792,
743,792,744,
744,792,793,
744,793,745,
745,793,794,
745,794,746,
746,794,795,
746,795,747,
747,795,796,
747,796,748,
748,796,797,
748,797,749,
749,797,798,
749,798,750,
750,798,799,
750,799,751,
751,799,800,
751,800,752,
752,800,801,
752,801,753,
753,801,802,
753,802,754,
754,802,803,
754,803,755,
755,803,804,
755,804,756,
756,804,805,
756,805,757,
757,805,806,
757,806,758,
758,806,807,
758,807,759,
759,807,808,
759,808,760,
760,808,809,
760,809,761,
761,809,810,
761,810,762,
762,810,811,
762,811,763,
763,811,812,
763,812,764,
764,812,813,
764,813,765,
765,813,814,
765,814,766,
766,814,815,
766,815,767,
767,815,816,
767,816,768,
768,816,817,
768,817,769,
769,817,770,
769,770,722,
770,818,819,
770,819,771,
771,819,820,
771,820,772,
772,820,821,
772,821,773,
773,821,822,
773,822,774,
774,822,823,
774,823,775,
775,823,824,
775,824,776,
776,824,825,
776,825,777,
777,825,826,
777,826,778,
778,826,827,
778,827,779,
779,827,828,
779,828,780,
780,828,829,
780,829,781,
781,829,830,
781,830,782,
782,830,831,
782,831,783,
783,831,832,
783,832,784,
784,832,833,
784,833,785,
785,833,834,
785,834,786,
786,834,835,
786,835,787,
787,835,836,
787,836,788,
788,836,837,
788,837,789,
789,837,838,
789,838,790,
790,838,839,
790,839,791,
791,839,840,
791,840,792,
792,840,841,
792,841,793,
793,841,842,
793,842,794,
794,842,843,
794,843,795,
795,843,844,
795,844,796,
796,844,845,
796,845,797,
797,845,846,
797,846,798,
798,846,847,
798,847,799,
799,847,848,
799,848,800,
800,848,849,
800,849,801,
801,849,850,
801,850,802,
802,850,851,
802,851,803,
803,851,852,
803,852,804,
804,852,853,
804,853,805,
805,853,854,
805,854,806,
806,854,855,
806,855,807,
807,855,856,
807,856,808,
808,856,857,
808,857,809,
809,857,858,
809,858,810,
810,858,859,
810,859,811,
811,859,860,
811,860,812,
812,860,861,
812,861,813,
813,861,862,
813,862,814,
814,862,863,
814,863,815,
815,863,864,
815,864,816,
816,864,865,
816,865,817,
817,865,818,
817,818,770,
818,866,867,
818,867,819,
819,867,868,
819,868,820,
820,868,869,
820,869,821,
821,869,870,
821,870,822,
822,870,871,
822,871,823,
823,871,872,
823,872,824,
824,872,873,
824,873,825,
825,873,874,
825,874,826,
826,874,875,
826,875,827,
827,875,876,
827,876,828,
828,876,877,
828,877,829,
829,877,878,
829,878,830,
830,878,879,
830,879,831,
831,879,880,
831,880,832,
832,880,881,
832,881,833,
833,881,882,
833,882,834,
834,882,883,
834,883,835,
835,883,884,
835,884,836,
836,884,885,
836,885,837,
837,885,886,
837,886,838,
838,886,887,
838,887,839,
839,887,888,
839,888,840,
840,888,889,
840,889,841,
841,889,890,
841,890,842,
842,890,891,
842,891,843,
843,891,892,
843,892,844,
844,892,893,
844,893,845,
845,893,894,
845,894,846,
846,894,895,
846,895,847,
847,895,896,
847,896,848,
848,896,897,
848,897,849,
849,897,898,
849,898,850,
850,898,899,
850,899,851,
851,899,900,
851,900,852,
852,900,901,
852,901,853,
853,901,902,
853,902,854,
854,902,903,
854,903,855,
855,903,904,
855,904,856,
856,904,905,
856,905,857,
857,905,906,
857,906,858,
858,906,907,
858,907,859,
859,907,908,
859,908,860,
860,908,909,
860,909,861,
861,909,910,
861,910,862,
862,910,911,
862,911,863,
863,911,912,
863,912,864,
864,912,913,
864,913,865,
865,913,866,
865,866,818,
866,914,915,
866,915,867,
867,915,916,
867,916,868,
868,916,917,
868,917,869,
869,917,918,
869,918,870,
870,918,919,
870,919,871,
871,919,920,
871,920,872,
872,920,921,
872,921,873,
873,921,922,
873,922,874,
874,922,923,
874,923,875,
875,923,924,
875,924,876,
876,924,925,
876,925,877,
877,925,926,
877,926,878,
878,926,927,
878,927,879,
879,927,928,
879,928,880,
880,928,929,
880,929,881,
881,929,930,
881,930,882,
882,930,931,
882,931,883,
883,931,932,
883,932,884,
884,932,933,
884,933,885,
885,933,934,
885,934,886,
886,934,935,
886,935,887,
887,935,936,
887,936,888,
888,936,937,
888,937,889,
889,937,938,
889,938,890,
890,938,939,
890,939,891,
891,939,940,
891,940,892,
892,940,941,
892,941,893,
893,941,942,
893,942,894,
894,942,943,
894,943,895,
895,943,944,
895,944,896,
896,944,945,
896,945,897,
897,945,946,
897,946,898,
898,946,947,
898,947,899,
899,947,948,
899,948,900,
900,948,949,
900,949,901,
901,949,950,
901,950,902,
902,950,951,
902,951,903,
903,951,952,
903,952,904,
904,952,953,
904,953,905,
905,953,954,
905,954,906,
906,954,955,
906,955,907,
907,955,956,
907,956,908,
908,956,957,
908,957,909,
909,957,958,
909,958,910,
910,958,959,
910,959,911,
911,959,960,
911,960,912,
912,960,961,
912,961,913,
913,961,914,
913,914,866,
914,962,963,
914,963,915,
915,963,964,
915,964,916,
916,964,965,
916,965,917,
917,965,966,
917,966,918,
918,966,967,
918,967,919,
919,967,968,
919,968,920,
920,968,969,
920,969,921,
921,969,970,
921,970,922,
922,970,971,
922,971,923,
923,971,972,
923,972,924,
924,972,973,
924,973,925,
925,973,974,
925,974,926,
926,974,975,
926,975,927,
927,975,976,
927,976,928,
928,976,977,
928,977,929,
929,977,978,
929,978,930,
930,978,979,
930,979,931,
931,979,980,
931,980,932,
932,980,981,
932,981,933,
933,981,982,
933,982,934,
934,982,983,
934,983,935,
935,983,984,
935,984,936,
936,984,985,
936,985,937,
937,985,986,
937,986,938,
938,986,987,
938,987,939,
939,987,988,
939,988,940,
940,988,989,
940,989,941,
941,989,990,
941,990,942,
942,990,991,
942,991,943,
943,991,992,
943,992,944,
944,992,993,
944,993,945,
945,993,994,
945,994,946,
946,994,995,
946,995,947,
947,995,996,
947,996,948,
948,996,997,
948,997,949,
949,997,998,
949,998,950,
950,998,999,
950,999,951,
951,999,1000,
951,1000,952,
952,1000,1001,
952,1001,953,
953,1001,1002,
953,1002,954,
954,1002,1003,
954,1003,955,
955,1003,1004,
955,1004,956,
956,1004,1005,
956,1005,957,
957,1005,1006,
957,1006,958,
958,1006,1007,
958,1007,959,
959,1007,1008,
959,1008,960,
960,1008,1009,
960,1009,961,
961,1009,962,
961,962,914,
962,1010,1011,
962,1011,963,
963,1011,1012,
963,1012,964,
964,1012,1013,
964,1013,965,
965,1013,1014,
965,1014,966,
966,1014,1015,
966,1015,967,
967,1015,1016,
967,1016,968,
968,1016,1017,
968,1017,969,
969,1017,1018,
969,1018,970,
970,1018,1019,
970,1019,971,
971,1019,1020,
971,1020,972,
972,1020,1021,
972,1021,973,
973,1021,1022,
973,1022,974,
974,1022,1023,
974,1023,975,
975,1023,1024,
975,1024,976,
976,1024,1025,
976,1025,977,
977,1025,1026,
977,1026,978,
978,1026,1027,
978,1027,979,
979,1027,1028,
979,1028,980,
980,1028,1029,
980,1029,981,
981,1029,1030,
981,1030,982,
982,1030,1031,
982,1031,983,
983,1031,1032,
983,1032,984,
984,1032,1033,
984,1033,985,
985,1033,1034,
985,1034,986,
986,1034,1035,
986,1035,987,
987,1035,1036,
987,1036,988,
988,1036,1037,
988,1037,989,
989,1037,1038,
989,1038,990,
990,1038,1039,
990,1039,991,
991,1039,1040,
991,1040,992,
992,1040,1041,
992,1041,993,
993,1041,1042,
993,1042,994,
994,1042,1043,
994,1043,995,
995,1043,1044,
995,1044,996,
996,1044,1045,
996,1045,997,
997,1045,1046,
997,1046,998,
998,1046,1047,
998,1047,999,
999,1047,1048,
999,1048,1000,
1000,1048,1049,
1000,1049,1001,
1001,1049,1050,
1001,1050,1002,
1002,1050,1051,
1002,1051,1003,
1003,1051,1052,
1003,1052,1004,
1004,1052,1053,
1004,1053,1005,
1005,1053,1054,
1005,1054,1006,
1006,1054,1055,
1006,1055,1007,
1007,1055,1056,
1007,1056,1008,
1008,1056,1057,
1008,1057,1009,
1009,1057,1010,
1009,1010,962,
1010,1058,1059,
1010,1059,1011,
1011,1059,1060,
1011,1060,1012,
1012,1060,1061,
1012,1061,1013,
1013,1061,1062,
1013,1062,1014,
1014,1062,1063,
1014,1063,1015,
1015,1063,1064,
1015,1064,1016,
1016,1064,1065,
1016,1065,1017,
1017,1065,1066,
1017,1066,1018,
1018,1066,1067,
1018,1067,1019,
1019,1067,1068,
1019,1068,1020,
1020,1068,1069,
1020,1069,1021,
1021,1069,1070,
1021,1070,1022,
1022,1070,1071,
1022,1071,1023,
1023,1071,1072,
1023,1072,1024,
1024,1072,1073,
1024,1073,1025,
1025,1073,1074,
1025,1074,1026,
1026,1074,1075,
1026,1075,1027,
1027,1075,1076,
1027,1076,1028,
1028,1076,1077,
1028,1077,1029,
1029,1077,1078,
1029,1078,1030,
1030,1078,1079,
1030,1079,1031,
1031,1079,1080,
1031,1080,1032,
1032,1080,1081,
1032,1081,1033,
1033,1081,1082,
1033,1082,1034,
1034,1082,1083,
1034,1083,1035,
1035,1083,1084,
1035,1084,1036,
1036,1084,1085,
1036,1085,1037,
1037,1085,1086,
1037,1086,1038,
1038,1086,1087,
1038,1087,1039,
1039,1087,1088,
1039,1088,1040,
1040,1088,1089,
1040,1089,1041,
1041,1089,1090,
1041,1090,1042,
1042,1090,1091,
1042,1091,1043,
1043,1091,1092,
1043,1092,1044,
1044,1092,1093,
1044,1093,1045,
1045,1093,1094,
1045,1094,1046,
1046,1094,1095,
1046,1095,1047,
1047,1095,1096,
1047,1096,1048,
1048,1096,1097,
1048,1097,1049,
1049,1097,1098,
1049,1098,1050,
1050,1098,1099,
1050,1099,1051,
1051,1099,1100,
1051,1100,1052,
1052,1100,1101,
1052,1101,1053,
1053,1101,1102,
1053,1102,1054,
1054,1102,1103,
1054,1103,1055,
1055,1103,1104,
1055,1104,1056,
1056,1104,1105,
1056,1105,1057,
1057,1105,1058,
1057,1058,1010,
1106,1059,1058,
1106,1060,1059,
1106,1061,1060,
1106,1062,1061,
1106,1063,1062,
1106,1064,1063,
1106,1065,1064,
1106,1066,1065,
1106,1067,1066,
1106,1068,1067,
1106,1069,1068,
1106,1070,1069,
1106,1071,1070,
1106,1072,1071,
1106,1073,1072,
1106,1074,1073,
1106,1075,1074,
1106,1076,1075,
1106,1077,1076,
1106,1078,1077,
1106,1079,1078,
1106,1080,1079,
1106,1081,1080,
1106,1082,1081,
1106,1083,1082,
1106,1084,1083,
1106,1085,1084,
1106,1086,1085,
1106,1087,1086,
1106,1088,1087,
1106,1089,1088,
1106,1090,1089,
1106,1091,1090,
1106,1092,1091,
1106,1093,1092,
1106,1094,1093,
1106,1095,1094,
1106,1096,1095,
1106,1097,1096,
1106,1098,1097,
1106,1099,1098,
1106,1100,1099,
1106,1101,1100,
1106,1102,1101,
1106,1103,1102,
1106,1104,1103,
1106,1105,1104,
1106,1058,1105,
};

	glNewList(sphereMaskCallistID,GL_COMPILE);


	glBegin(GL_TRIANGLES);

	for(int i=0;i<2208;++i)
	{
		glVertex3f(sphereVertexList[(sphereFacetList[i*3]-1)*3],sphereVertexList[(sphereFacetList[i*3]-1)*3+1],sphereVertexList[(sphereFacetList[i*3]-1)*3+2]);
		glVertex3f(sphereVertexList[(sphereFacetList[i*3+1]-1)*3],sphereVertexList[(sphereFacetList[i*3+1]-1)*3+1],sphereVertexList[(sphereFacetList[i*3+1]-1)*3+2]);
		glVertex3f(sphereVertexList[(sphereFacetList[i*3+2]-1)*3],sphereVertexList[(sphereFacetList[i*3+2]-1)*3+1],sphereVertexList[(sphereFacetList[i*3+2]-1)*3+2]);

	}

	glEnd();



	glEndList();

	float boxVertexList[]={
	  -5.0000, -5.0000, 0.0000,
  -5.0000, 5.0000, 0.0000,
  5.0000, 5.0000, 0.0000,
  5.0000, -5.0000, 0.0000,
  -5.0000, -5.0000, 10.0000,
  5.0000, -5.0000, 10.0000,
  5.0000, 5.0000, 10.0000,
  -5.0000, 5.0000, 10.0000
	};

	int boxFacetList[]=
	{
	 1, 2, 3, 
 3, 4, 1, 
 5, 6, 7, 
 7, 8, 5, 
 1, 4, 6, 
 6, 5, 1, 
 4, 3, 7, 
 7, 6, 4, 
 3, 2, 8, 
 8, 7, 3, 
 2, 1, 5, 
 5, 8, 2 
	};

	glNewList(boxCallListID,GL_COMPILE);


	glBegin(GL_TRIANGLES);

	for(int i=0;i<12;++i)
	{
		glVertex3f(boxVertexList[(boxFacetList[i*3]-1)*3],boxVertexList[(boxFacetList[i*3]-1)*3+1],boxVertexList[(boxFacetList[i*3]-1)*3+2]);
		glVertex3f(boxVertexList[(boxFacetList[i*3+1]-1)*3],boxVertexList[(boxFacetList[i*3+1]-1)*3+1],boxVertexList[(boxFacetList[i*3+1]-1)*3+2]);
		glVertex3f(boxVertexList[(boxFacetList[i*3+2]-1)*3],boxVertexList[(boxFacetList[i*3+2]-1)*3+1],boxVertexList[(boxFacetList[i*3+2]-1)*3+2]);

	}

	glEnd();



	glEndList();

}

void AxisGlyph::drawScaleGlyph(float dis,GGL::Point3f &pos)
{
	glClear(GL_DEPTH_BUFFER_BIT);
	glDisable(GL_LIGHTING);
	glLineWidth(1);

	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
		glTranslatef(pos.X(),pos.Y(),pos.Z());

		glPushMatrix();
			if(currentOn==SCALE_Z)
				glColor3ub(255,248,56);
			else
				glColor3ub(27,165,218);
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,0,50.0f);

			glCallList(boxCallListID);
		glPopMatrix();
		
		
		glBegin(GL_LINES);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,60.0f/dis);
		glEnd();
	
		glPushMatrix();
			if(currentOn==SCALE_X)
				glColor3ub(255,248,56);
			else
				glColor3ub(248,24,48);
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(50.0f,0,0);
			glRotatef(90.0f,0,1,0);
			glCallList(boxCallListID);
		glPopMatrix();

		glBegin(GL_LINES);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(60.0f/dis,0.0f,0.0f);
		glEnd();

		glPushMatrix();
			if(currentOn==SCALE_Y)
				glColor3ub(255,248,56);
			else
				glColor3ub(138,215,73);
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,50.0f,0);
			glRotatef(-90,1,0,0);
			glCallList(boxCallListID);	
		glPopMatrix();
	
		glBegin(GL_LINES);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,60.0f/dis,0.0f);
		glEnd();

		glColor3ub(255,248,56);
	
		glBegin(GL_LINES);
			glVertex3f(0.0f,20.0f/dis,0.0f);
			glVertex3f(20.0f/dis,0.0f,0.0f);	
			glVertex3f(0.0f,20.0f/dis,0.0f);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(20.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(0.0f,40.0f/dis,0.0f);
			glVertex3f(40.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,40.0f/dis,0.0f);
			glVertex3f(0.0f,0.0f,40.0f/dis);
			glVertex3f(40.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,40.0f/dis);
		glEnd();

		
		glEnable(GL_BLEND);
		glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
		
		glColor4ub(255,248,56,128);

		if(currentOn==SCALE_ALL)
		{	
			glBegin(GL_TRIANGLE_STRIP);
			glVertex3f(0.0f,20.0f/dis,0.0f);
			glVertex3f(20.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(0.0f,20.0f/dis,0.0f);
			glEnd();
		}
		else if(currentOn==SCALE_XY)
		{
			glBegin(GL_QUADS);
			glVertex3f(0.0f,40.0f/dis,0.0f);
			glVertex3f(40.0f/dis,0.0f,0.0f);
			glVertex3f(20.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,20.0f/dis,0.0f);
			glEnd();
		}
		else if(currentOn==SCALE_YZ)
		{
			glBegin(GL_QUADS);
			glVertex3f(0.0f,40.0f/dis,0.0f);
			glVertex3f(0.0f,0.0f,40.0f/dis);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(0.0f,20.0f/dis,0.0f);
			glEnd();

		}
		else if(currentOn==SCALE_XZ)
		{
			glBegin(GL_QUADS);
			glVertex3f(40.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,40.0f/dis);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(20.0f/dis,0.0f,0.0f);
			glEnd();
		}

		glDisable(GL_BLEND);

	glPopMatrix();
	glEnable(GL_LIGHTING);
}

void AxisGlyph::drawComboGlyph(float dis,GGL::Point3f &pos,GGL::Point3f &eyeDir)
{

}

void AxisGlyph::drawRotateGlyph(float dis,GGL::Point3f &pos,GGL::Point3f &eyeDir)
{
	glClear(GL_DEPTH_BUFFER_BIT);
	eyeDir.Normalize();
	glLineWidth(1);
	glDisable(GL_LIGHTING);

	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
		glTranslatef(pos.X(),pos.Y(),pos.Z());
		glColorMask(0,0,0,0);

		glEnable(GL_POLYGON_OFFSET_FILL);
		glDisable(GL_LIGHTING);
		glPolygonOffset(1, 1);

		glPushMatrix();
			glScalef(2.0f/dis,2.0f/dis,2.0f/dis);
			glCallList(sphereMaskCallistID);
		glPopMatrix();
	
		glDisable(GL_POLYGON_OFFSET_FILL);
		glColorMask(1,1,1,1);
	
		glPushMatrix();
			if(currentOn==ROTATE_Z)
				glColor3ub(255,248,56);
			else
				glColor3ub(27,165,218);
			glScalef(1.01f/dis,1.01f/dis,1.01f/dis);
			glCallList(circleCallListID);
		glPopMatrix();

		glPushMatrix();
			if(currentOn==ROTATE_Y)
				glColor3ub(255,248,56);
			else
				glColor3ub(138,215,73);
			glRotatef(90.0f,1.0f,0.0f,0.0f);
			glScalef(1.01f/dis,1.01f/dis,1.01f/dis);
			glCallList(circleCallListID);
		glPopMatrix();

		glPushMatrix();
			if(currentOn==ROTATE_X)
				glColor3ub(255,248,56);
			else
				glColor3ub(248,24,48);
			glRotatef(90.0f,0.0f,1.0f,0.0f);
			glScalef(1.01f/dis,1.01f/dis,1.01f/dis);
			glCallList(circleCallListID);
		glPopMatrix();

		float angleZ=acos(eyeDir.Z());
		eyeDir[2]=0.0f;
		eyeDir.Normalize();
		
		float angleX=acos(eyeDir.X());

		if(eyeDir.X()>=0 && eyeDir.Y()>=0)
		{
		
		}
		else if(eyeDir.X()<0 && eyeDir.Y()>=0)
		{
			angleX=TWOPI+angleX;
		}
		else if(eyeDir.X()<0 && eyeDir.Y()<0)
		{
			angleX=TWOPI-angleX;
		}
		else if(eyeDir.X()>=0 && eyeDir.Y()<0)
		{
			angleX=0-angleX;
		}
		glClear(GL_DEPTH_BUFFER_BIT);

		glPushMatrix();
			glRotatef(angleX/PI*180.0f,0.0f,0.0f,1.0f);
			glRotatef(angleZ/PI*180.0f,0.0f,1.0f,0.0f);	
			glScalef(1.01f/dis,1.01f/dis,1.01f/dis);
			glColor3ub(88,88,88);
			glCallList(circleCallListID);
		glPopMatrix();

		glPushMatrix();
			glRotatef(angleX/PI*180.0f,0.0f,0.0f,1.0f);
			glRotatef(angleZ/PI*180.0f,0.0f,1.0f,0.0f);
			glScalef(1.2f/dis,1.2f/dis,1.2f/dis);
			glColor3ub(255,248,56);
			glCallList(circleCallListID);
		glPopMatrix();

	glPopMatrix();
	glLineWidth(1);
	glEnable(GL_LIGHTING);
}

void AxisGlyph::drawForSelection(float dis,GGL::Point3f &pos,GGL::Point3f &eyeDir)
{
	glInitNames();

	switch(currentType)
	{
	case MOVE:
		drawMoveGlyphForSelection(dis,pos);
		break;
	case ROTATE:
		drawRotateGlyphForSelection(dis,pos,eyeDir);
		break;
	case SCALE:
		drawScaleGlyphForSelection(dis,pos);
		break;
	case COMBO:
		drawComboGlyphForSelection(dis,pos,eyeDir);
		break;
	}
}

bool AxisGlyph::isHover(int x,int y,float dis,GGL::Point3f &pos,GGL::Point3f &eyeDir)
{
	GLuint selectBuf[4];	
	glSelectBuffer(4,selectBuf);
	glRenderMode(GL_SELECT); 

	drawForSelection(dis,pos,eyeDir);

	GLuint hits = glRenderMode(GL_RENDER);



	if (hits != 0)
	{
		GLuint names,*ptr = (GLuint *) selectBuf;
		GLuint minZ = 0xffffffff;
		GLuint *ptrNames, numberOfNames;

	
		names = *ptr;
		ptr++;
		if (*ptr < minZ) 
		{
			numberOfNames = names;
			minZ = *ptr;
			ptrNames = ptr+2;
		}

		ptr = ptrNames;

		switch(*ptr)
		{
		case MOVE_X:
			currentOn=MOVE_X;
			emit axisGlyphMoveXOn();
			break;
		case MOVE_Y:
			currentOn=MOVE_Y;
			emit axisGlyphMoveYOn();
			break;

		case MOVE_Z:
			currentOn=MOVE_Z;
			emit axisGlyphMoveZOn();
			break;

		case MOVE_XY:
			currentOn=MOVE_XY;
			emit axisGlyphMoveXYOn();
			break;

		case MOVE_YZ:	
			currentOn=MOVE_YZ;
			emit axisGlyphMoveYZOn();
			break;

		case MOVE_XZ:	
			currentOn=MOVE_XZ;
			emit axisGlyphMoveXZOn();
			break;

		case ROTATE_X:	
			currentOn=ROTATE_X;
			emit axisGlyphRotateXOn();
			break;

		case ROTATE_Y:
			currentOn=ROTATE_Y;
			emit axisGlyphRotateYOn();
			break;

		case ROTATE_Z:
			currentOn=ROTATE_Z;
			emit axisGlyphRotateZOn();
			break;

		case ROTATE_SCREEN:
			currentOn=ROTATE_SCREEN;
			emit axisGlyphRotateScreenOn();
			break;

		case SCALE_X:
			currentOn=SCALE_X;
			emit axisGlyphScaleXOn();
			break;

		case SCALE_Y:
			currentOn=SCALE_Y;
			emit axisGlyphScaleYOn();
			break;

		case SCALE_Z:
			currentOn=SCALE_Z;
			emit axisGlyphScaleZOn();
			break;

		case SCALE_XY:	
			currentOn=SCALE_XY;
			emit axisGlyphScaleXYOn();
			break;

		case SCALE_YZ:
			currentOn=SCALE_YZ;
			emit axisGlyphScaleYZOn();
			break;

		case SCALE_XZ:
			currentOn=SCALE_XZ;
			emit axisGlyphScaleXZOn();
			break;

		case SCALE_ALL:
			currentOn=SCALE_ALL;
			emit axisGlyphScaleAllOn();
			break;
		}
		return true;
	}
	else {
		currentOn=NONE;
		return false;
	}
}

void AxisGlyph::draw(float dis,GGL::Point3f &pos,GGL::Point3f &eyeDir)
{
	switch(currentType)
	{
	case MOVE:
		drawMoveGlyph(dis,pos);
		break;
	case ROTATE:
		drawRotateGlyph(dis,pos,eyeDir);
		break;
	case SCALE:
		drawScaleGlyph(dis,pos);
		break;
	case COMBO:
		drawComboGlyph(dis,pos,eyeDir);
		break;
	}
}

void AxisGlyph::drawMoveGlyph(float dis,GGL::Point3f &pos)
{
	glClear(GL_DEPTH_BUFFER_BIT);
	glDisable(GL_LIGHTING);
	glLineWidth(1);
	
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
		glTranslatef(pos.X(),pos.Y(),pos.Z());

		glPushMatrix();
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,0,50.0f);
			if(currentOn==MOVE_Z)
				glColor3ub(255,248,56);
			else
				glColor3ub(27,165,218);
			glCallList(arrowCallListID);
		glPopMatrix();
		

		glColor3ub(255,248,56);	
		glBegin(GL_LINES);
			glVertex3f(30.0f/dis,0.0f,0.0f);
			glVertex3f(30.0f/dis,0.0f,30.0f/dis);

			glVertex3f(0.0f,30.0f/dis,0.0f);
			glVertex3f(0.0f,30.0f/dis,30.0f/dis);

			if(currentOn!=MOVE_Z)
				glColor3ub(27,165,218);	
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,60.0f/dis);
		glEnd();
	
		glPushMatrix();
			if(currentOn==MOVE_X)
				glColor3ub(255,248,56);
			else
				glColor3ub(248,24,48);
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(50.0f,0,0);
			glRotatef(90.0f,0,1,0);
			glCallList(arrowCallListID);
		glPopMatrix();		
		
	
		glColor3ub(255,248,56);	
		glBegin(GL_LINES);
			glVertex3f(0.0f,30.0f/dis,0.0f);
			glVertex3f(30.0f/dis,30.0f/dis,0.0f);
	
			glVertex3f(0.0f,0.0f,30.0f/dis);
			glVertex3f(30.0f/dis,0.0f,30.0f/dis);

			if(currentOn!=MOVE_X)
				glColor3ub(248,24,48);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(60.0f/dis,0.0f,0.0f);
		glEnd();
	
		glPushMatrix();
			if(currentOn==MOVE_Y)
				glColor3ub(255,248,56);
			else
				glColor3ub(138,215,73);
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,50.0f,0);
			glRotatef(-90,1,0,0);
			glCallList(arrowCallListID);
		glPopMatrix();
		
		glColor3ub(255,248,56);

		glBegin(GL_LINES);
			glVertex3f(30.0f/dis,0.0f,0.0f);
			glVertex3f(30.0f/dis,30.0f/dis,0.0f);

			glVertex3f(0.0f,0.0f,30.0f/dis);
			glVertex3f(0.0f,30.0f/dis,30.0f/dis);

			if(currentOn!=MOVE_Y)
				glColor3ub(138,215,73);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,60.0f/dis,0.0f);
		glEnd();

		glEnable(GL_BLEND);
		glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
		
		glColor4ub(255,248,56,128);

		if(currentOn==MOVE_XY)
		{
			glBegin(GL_QUADS);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(30.0f/dis,0.0f,0.0f);
			glVertex3f(30.0f/dis,30.0f/dis,0.0f);
			glVertex3f(0.0f,30.0f/dis,0.0f);
			glEnd();
		}
		else if(currentOn==MOVE_YZ)
		{
			glBegin(GL_QUADS);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,30.0f/dis,0.0f);
			glVertex3f(0.0f,30.0f/dis,30.0f/dis);
			glVertex3f(0.0f,0.0f,30.0f/dis);
			glEnd();
		}
		else if(currentOn==MOVE_XZ)
		{
			glBegin(GL_QUADS);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,30.0f/dis);
			glVertex3f(30.0f/dis,0.0f,30.0f/dis);
			glVertex3f(30.0f/dis,0.0f,0.0f);
			glEnd();
		}

		glDisable(GL_BLEND);

	glPopMatrix();

	glEnable(GL_LIGHTING);
}

void AxisGlyph::drawMoveGlyphForSelection(float dis,GGL::Point3f &pos)
{	
	glMatrixMode(GL_MODELVIEW);
	glLineWidth(1);

	glPushMatrix();
		glTranslatef(pos.X(),pos.Y(),pos.Z());
	
		glPushMatrix();
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,0,50.0f);
			glPushName(MOVE_Z);
				glCallList(arrowCallListID);
			glPopName();
		glPopMatrix();
	
		glPushMatrix();
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(50.0f,0,0);
			glRotatef(90.0f,0,1,0);
			glPushName(MOVE_X);
				glCallList(arrowCallListID);
			glPopName();
		glPopMatrix();

		glPushMatrix();
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,50.0f,0);
			glRotatef(-90,1,0,0);
			glPushName(MOVE_Y);
				glCallList(arrowCallListID);
			glPopName();
		glPopMatrix();
	
		glPushName(MOVE_XY);
		glBegin(GL_QUADS);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(30.0f/dis,0.0f,0.0f);
			glVertex3f(30.0f/dis,30.0f/dis,0.0f);
			glVertex3f(0.0f,30.0f/dis,0.0f);
		glEnd();
		glPopName();

		glPushName(MOVE_YZ);
		glBegin(GL_QUADS);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,30.0f/dis,0.0f);
			glVertex3f(0.0f,30.0f/dis,30.0f/dis);
			glVertex3f(0.0f,0.0f,30.0f/dis);
		glEnd();
		glPopName();

		glPushName(MOVE_XZ);
		glBegin(GL_QUADS);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,30.0f/dis);
			glVertex3f(30.0f/dis,0.0f,30.0f/dis);
			glVertex3f(30.0f/dis,0.0f,0.0f);
		glEnd();
		glPopName();


	glPopMatrix();
}

void AxisGlyph::drawRotateGlyphForSelection(float dis,GGL::Point3f &pos,GGL::Point3f &eyeDir)
{
	eyeDir.Normalize();
	glLineWidth(1);

	glPushMatrix();
		glTranslatef(pos.X(),pos.Y(),pos.Z());
	
		glPushMatrix();
			glScalef(1.01f/dis,1.01f/dis,1.01f/dis);
			glPushName(ROTATE_Z);
				glCallList(circleCallListID);
			glPopName();
		glPopMatrix();

		glPushMatrix();
			glRotatef(90.0f,1.0f,0.0f,0.0f);
			glScalef(1.01f/dis,1.01f/dis,1.01f/dis);
			glPushName(ROTATE_Y);
				glCallList(circleCallListID);
			glPopName();
		glPopMatrix();

		glPushMatrix();
			glRotatef(90.0f,0.0f,1.0f,0.0f);
			glScalef(1.01f/dis,1.01f/dis,1.01f/dis);
			glPushName(ROTATE_X);
				glCallList(circleCallListID);
			glPopName();
		glPopMatrix();


		float angleZ=acos(eyeDir.Z());
		eyeDir[2]=0.0f;
		eyeDir.Normalize();
		float angleX=acos(eyeDir.X());

		if(eyeDir.X()>=0 && eyeDir.Y()>=0)
		{
		
		}
		else if(eyeDir.X()<0 && eyeDir.Y()>=0)
		{
			angleX=TWOPI+angleX;
		}
		else if(eyeDir.X()<0 && eyeDir.Y()<0)
		{
			angleX=TWOPI-angleX;
		}
		else if(eyeDir.X()>=0 && eyeDir.Y()<0)
		{
			angleX=0-angleX;
		}

		glPushMatrix();
			glRotatef(angleX/PI*180.0f,0.0f,0.0f,1.0f);
			glRotatef(angleZ/PI*180.0f,0.0f,1.0f,0.0f);
			glScalef(1.2f/dis,1.2f/dis,1.2f/dis);
			glColor3ub(255,248,56);
			glPushName(ROTATE_SCREEN);
				glCallList(circleCallListID);
			glPopName();
		glPopMatrix();

	glPopMatrix();
}

void AxisGlyph::drawScaleGlyphForSelection(float dis,GGL::Point3f &pos)
{	
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
		glTranslatef(pos.X(),pos.Y(),pos.Z());
	
		glPushMatrix();
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,0,50.0f);
			glPushName(SCALE_Z);
				glCallList(boxCallListID);
			glPopName();
		glPopMatrix();
		
		glPushMatrix();
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(50.0f,0,0);
			glRotatef(90.0f,0,1,0);
			glPushName(SCALE_X);
				glCallList(boxCallListID);
			glPopName();
		glPopMatrix();

		glPushMatrix();
			glScalef(1.0f/dis,1.0f/dis,1.0f/dis);
			glTranslatef(0,50.0f,0);
			glRotatef(-90,1,0,0);
			glPushName(SCALE_Y);
				glCallList(boxCallListID);
			glPopName();
		glPopMatrix();
	
		glPushName(SCALE_ALL);
		glBegin(GL_TRIANGLE_STRIP);
			glVertex3f(0.0f,20.0f/dis,0.0f);
			glVertex3f(20.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(0.0f,20.0f/dis,0.0f);
		glEnd();
		glPopName();

		glPushName(SCALE_XY);
		glBegin(GL_QUADS);
			glVertex3f(0.0f,40.0f/dis,0.0f);
			glVertex3f(40.0f/dis,0.0f,0.0f);
			glVertex3f(20.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,20.0f/dis,0.0f);
		glEnd();
		glPopName();

		glPushName(SCALE_YZ);
		glBegin(GL_QUADS);
			glVertex3f(0.0f,40.0f/dis,0.0f);
			glVertex3f(0.0f,0.0f,40.0f/dis);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(0.0f,20.0f/dis,0.0f);
		glEnd();
		glPopName();
		
		glPushName(SCALE_XZ);
		glBegin(GL_QUADS);
			glVertex3f(40.0f/dis,0.0f,0.0f);
			glVertex3f(0.0f,0.0f,40.0f/dis);
			glVertex3f(0.0f,0.0f,20.0f/dis);
			glVertex3f(20.0f/dis,0.0f,0.0f);
		glEnd();
		glPopName();

	
	glPopMatrix();
}

void AxisGlyph::drawComboGlyphForSelection(float dis,GGL::Point3f &pos,GGL::Point3f &eyeDir)
{
	
}